slashback100 / presence_simulation

Home Assistant Presence Simulation
654 stars 26 forks source link

Presence simulation triggered after reboot since 2022.6 #58

Closed lostcontrol closed 2 years ago

lostcontrol commented 2 years ago

Since upgrading to HA 2022.6, I had some weird behavior at home with some lights turning on and off magically without human intervention. I tracked it down to HA and especially this extension. Presence simulation is started by the following rule:

alias: '[Alarme] Activation de la simulation de présence'
description: ''
trigger:
  - platform: state
    entity_id: switch.alarme_commutation
    from: 'off'
    to: 'on'
    for:
      hours: 0
      minutes: 5
      seconds: 0
condition: []
action:
  - service: presence_simulation.start
    data: {}
mode: single

I can confirm that switch.alarme_commutation is remaining off all the time and that this automation is not triggered when the problem occurs. It seems that presence simulation is started somehow after a reboot (this happened for me after every upgrade/restart since HA 2022.6) even without calling presence_simulation.startexplicitly.

There is nothing interesting in the logs. This never occured before HA 2022.6.

Calling presence_simulation.stop after an upgrade/restart of HA fixes the issue for me.

calisro commented 2 years ago

I was just coming here for this. THanks! Mine is doing the same thing. It is activated on reboot every time.

Added this crude fix for now.

alias: Fix Presence
description: ''
trigger:
  - platform: state
    entity_id:
      - switch.presence_simulation
    to: 'on'
condition:
  - condition: state
    entity_id: input_boolean.away
    state: 'off'
  - condition: template
    value_template: '{{ ( now() - states(''sensor.uptime'')|as_datetime ).seconds < 120 }}'
action:
  - service: homeassistant.turn_off
    data: {}
    target:
      entity_id: switch.presence_simulation
mode: single
axlback commented 2 years ago

Since upgrading to HA 2022.6, I had some weird behavior at home with some lights turning on and off magically without human intervention. I tracked it down to HA and especially this extension. Presence simulation is started by the following rule:

alias: '[Alarme] Activation de la simulation de présence'
description: ''
trigger:
  - platform: state
    entity_id: switch.alarme_commutation
    from: 'off'
    to: 'on'
    for:
      hours: 0
      minutes: 5
      seconds: 0
condition: []
action:
  - service: presence_simulation.start
    data: {}
mode: single

I can confirm that switch.alarme_commutation is remaining off all the time and that this automation is not triggered when the problem occurs. It seems that presence simulation is started somehow after a reboot (this happened for me after every upgrade/restart since HA 2022.6) even without calling presence_simulation.startexplicitly.

There is nothing interesting in the logs. This never occured before HA 2022.6.

Calling presence_simulation.stop after an upgrade/restart of HA fixes the issue for me.

Same issue here.

slashback100 commented 2 years ago

Hmm, I'm in 2022.6.1 and I don't observe this issue... Could someone share me a log?

cokeman0 commented 2 years ago

I also have the same issue.

It's activated on every reboot

slashback100 commented 2 years ago

I may have found the issue. I released a v1.17.

calisro commented 2 years ago

Thank-you! Working fine now.

axlback commented 2 years ago

I may have found the issue. I released a v1.17.

Fixed for me. Thank you very much.

lostcontrol commented 2 years ago

I may have found the issue. I released a v1.17.

Fixed for me. Thank you very much.

Yep, fixed. Thank you.