FutureTense / keymaster

Home Assistant integration for managing Z-Wave enabled locks
MIT License
238 stars 45 forks source link

ISSUE: Trigger logic seems to flawed for keymaster_<lock>_locked and keymaster_turn_off_retry_<lock> #346

Open theOrakle opened 11 months ago

theOrakle commented 11 months ago

Describe the bug

Is there any reason the following would not need to run if timer.keymaster_<lock>_autolock was not running.

  - alias: keymaster_<lock>_locked
    id: keymaster_<lock>_locked
    trigger:
      entity_id: lock.<lock_id>
      platform: state
      to: locked
    action:
      - service: timer.cancel
        entity_id: timer.keymaster_<lock>_autolock

As well as input_boolean.keymaster_<lock>_retry not turned on.

  - alias: keymaster_turn_off_retry_<lock>
    id: keymaster_turn_off_retry_<lock>
    trigger:
      entity_id: lock.<lock_id>
      platform: state
      to: locked
    action:
      - service: input_boolean.turn_off
        target:
          entity_id: input_boolean.keymaster_<lock>_retry

Can we add 2 conditions to save 3 subsequent trigger firings?

Environment (please complete the following information): Irrelevant

Logs

2023-12-22 07:13:13.599 INFO (MainThread) [homeassistant.components.automation.keymaster_study_locked] keymaster_study_locked: Running automation actions
2023-12-22 07:13:13.599 INFO (MainThread) [homeassistant.components.automation.keymaster_study_locked] keymaster_study_locked: Executing step call service
2023-12-22 07:13:13.599 INFO (MainThread) [homeassistant.components.automation.keymaster_turn_off_retry_study] keymaster_turn_off_retry_study: Running automation actions
2023-12-22 07:13:13.599 INFO (MainThread) [homeassistant.components.automation.keymaster_turn_off_retry_study] keymaster_turn_off_retry_study: Executing step call service
2023-12-22 07:13:13.605 INFO (MainThread) [homeassistant.components.automation.keymaster_study_timer_canceled] keymaster_study_timer_canceled: Running automation actions
2023-12-22 07:13:13.605 INFO (MainThread) [homeassistant.components.automation.keymaster_study_timer_canceled] keymaster_study_timer_canceled: Executing step call service

Screenshots Timer is idle:

image

Input boolean is off:

image

Additional context Please let me know if I need to go into more detail...