Find time difference in different rows with a condition
You don't need a pivot here. You can use LAG window function to retrieve the previous status and datetimes for each device, then compare their minutes if it goes from 0 to 0 or from 0 to 1.

IF OBJECT_ID('tempdb..#DeviceStatus') IS NOT NULL
    DROP TABLE #DeviceStatus

CREATE TABLE #DeviceStatus (
    rownum INT IDENTITY,
    device VARCHAR(10),
    datetime datetime,
    status BIT)

INSERT INTO #DeviceStatus (
    device,
    datetime,
    status)
VALUES
    ('device_1',   '2018-06-27 12:10:05.443',      1),
    ('device_1',   '2018-06-27 12:02:31.467',      0),
    ('device_1',   '2018-06-27 11:57:24.260',      1),
    ('device_2',   '2018-06-27 11:57:24.260',      1),
    ('device_2',   '2018-06-26 12:57:24.260',      1),
    ('device_3',   '2018-06-26 09:57:24.260',      1),     
    ('device_3',   '2018-06-25 09:57:24.260',      0),
    ('device_3',   '2018-06-26 09:57:24.260',      0),
    ('device_3',   '2018-06-24 09:57:24.260',      1),
    ('device_4',   '2018-06-27 09:57:24.260',      0),
    ('device_4',   '2018-06-26 09:57:24.260',      0)



;WITH LaggedStatus AS
(
    SELECT
        D.*,
        LaggedStatus = LAG(D.status) OVER (PARTITION BY D.device ORDER BY D.datetime ASC),
        LaggedDatetime = LAG(D.Datetime) OVER (PARTITION BY D.device ORDER BY D.datetime ASC)
    FROM
        #DeviceStatus AS D
),
MinutesBroken AS
(
    SELECT
        L.*,
        MinutesBroken = CASE WHEN L.LaggedStatus = 0 THEN DATEDIFF(MINUTE, L.LaggedDatetime, L.datetime) END
    FROM
        LaggedStatus AS L
)
SELECT
    M.device,
    TotalMinutesBroken = ISNULL(SUM(M.MinutesBroken), 0)
FROM
    MinutesBroken AS M
GROUP BY
    M.device


Result:

device      TotalMinutesBroken
device_1    8
device_2    0
device_3    1440
device_4    1440


Note: LAG is for version 2012+, if you have a previous one, you can simluate lag's effect with ROW_NUMBER().