Device turned off without any trigger

Hello,

i have a weird problem.
Here are my logbook entries:

7:44 AM Sun has risen
7:32 AM Turn Furnance ON has been triggered
7:31 AM 2nd Floor Heating turned on
6:59 AM Light Side turned off
6:59 AM Turn Side Light OFF has been triggered
→ 6:58 AM Furnance turned on
6:31 AM Weather changed to Rain
3:31 AM Wind Direction changed to North
→ 2:42 AM Furnance turned off
→ 2:41 AM Furnance turned on
→ 2:41 AM Turn Furnance ON has been triggered
→ 2:40 AM 1st Floor Heating turned on
2:31 AM Weather changed to Light Rain

At 2:41 AM the Furnance is turned ON with “Turn Furnance ON” automation then without any reason at 2:42 AM the Furnance is turned OFF.
At 6:58 AM i turned ON the Furnance manually.
Here are my two scripts which controls the Furnance:

- id: turn_furnance_on
  alias: "Turn Furnance ON"
  trigger:
    platform: state
    entity_id: binary_sensor.1st_floor_heating_4, binary_sensor.2nd_floor_heating_3
    from: 'off'
    to: 'on'
    for:
      minutes: 1
  condition:
    condition: or
    conditions:
      - condition: state
        entity_id: binary_sensor.1st_floor_heating_4
        state: 'on'
      - condition: state
        entity_id: binary_sensor.2nd_floor_heating_3
        state: 'on'
  action:
    - service: switch.turn_on
      entity_id: switch.furnance_5

- id: turn_furnance_off
  alias: "Turn Furnance OFF"
  trigger:
    platform: state
    entity_id: binary_sensor.1st_floor_heating_4, binary_sensor.2nd_floor_heating_3
    from: 'on'
    to: 'off'
    for:
      minutes: 1
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: binary_sensor.1st_floor_heating_4
        state: 'off'
      - condition: state
        entity_id: binary_sensor.2nd_floor_heating_3
        state: 'off'
  action:
    - service: switch.turn_off
      entity_id: switch.furnance_5

Thank you for taking the time to help me, i really do appreciate it.

Are you sure that one of your binary sensors (binary_sensor.1st_floor_heating_4) didn’t turn off? I’ve seen that the logbook doesn’t capture every event reliably. Especially if there are several things happening simultaneously.

In the database i have these entries:

"448908","binary_sensor","binary_sensor.1st_floor_heating_4","off","{""battery_level"": ""100"", ""device_armed"": ""False"", ""last_tripped_time"": ""2018-11-20T21:12:14+00:00"", ""device_tripped"": ""False"", ""Vera Device Id"": 4, ""friendly_name"": ""1st Floor Heating""}","474322","2018-11-20 21:12:14","2018-11-20 21:12:14","2018-11-20 21:12:14","c66d70f65e4549c9923428fe0d17deef",NULL
"449187","binary_sensor","binary_sensor.1st_floor_heating_4","on","{""battery_level"": ""100"", ""device_armed"": ""False"", ""last_tripped_time"": ""2018-11-21T00:40:44+00:00"", ""device_tripped"": ""True"", ""Vera Device Id"": 4, ""friendly_name"": ""1st Floor Heating""}","474604","2018-11-21 00:40:44","2018-11-21 00:40:44","2018-11-21 00:40:44","0a06c5c057fe4029b7f7073f390125c5",NULL
"449988","binary_sensor","binary_sensor.1st_floor_heating_4","off","{""battery_level"": ""100"", ""device_armed"": ""False"", ""last_tripped_time"": ""2018-11-21T07:18:19+00:00"", ""device_tripped"": ""False"", ""Vera Device Id"": 4, ""friendly_name"": ""1st Floor Heating""}","475416","2018-11-21 07:18:19","2018-11-21 07:18:19","2018-11-21 07:18:19","dbdb00ca3f1e4260b765a86c9bec876f",NULL

I should look in this period of time after the events ?

From the time stamps it doesn’t look like it turned off until several hours later. I’m sorry that’s the only thing I can think of.

Can i make another automation which looks from time to time if any of the floor heating sensors are ON and the furnance is OFF to start the furnance ?

It seems i resolved adding the condition to execute the action if the change in the trigger persist for 1 minute.

- id: turn_furnance_on
  alias: "Turn Furnance ON"
  trigger:
    platform: state
    entity_id: binary_sensor.1st_floor_heating_4, binary_sensor.2nd_floor_heating_3
    from: 'off'
    to: 'on'
    for:
      minutes: 1
  condition:
    condition: or
    conditions:
      - condition: state
        entity_id: binary_sensor.1st_floor_heating_4
        state: 'on'
      - condition: state
        entity_id: binary_sensor.2nd_floor_heating_3
        state: 'on'
  action:
    - service: switch.turn_on
      entity_id: switch.furnance_5

- id: turn_furnance_off
  alias: "Turn Furnance OFF"
  trigger:
    platform: state
    entity_id: binary_sensor.1st_floor_heating_4, binary_sensor.2nd_floor_heating_3
    from: 'on'
    to: 'off'
    for:
      minutes: 1
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: binary_sensor.1st_floor_heating_4
        state: 'off'
      - condition: state
        entity_id: binary_sensor.2nd_floor_heating_3
        state: 'off'
  action:
    - service: switch.turn_off
      entity_id: switch.furnance_5