#Continuity Checking? Need a daemon / watchdog like process to status check devices

1 messages · Page 1 of 1 (latest)

spark gale
#

Here's the scenario i'm faced with, I have some "dumb devices" that were made smart, ie: Ceiling Fans (via Bond), or even some smart devices that just have weird side effects. I think it would be useful to have a configurable daemon/watchdog where you could say "If its between X time and Y time, and this entity is ON, turn it OFF and make sure its stays OFF" - granted you can do that on any SINGLE automation trigger, but... let's say, you have some dirty power, and it causes that device to flicker and randomly turn back on (in the middle of the night)... the automation will never sense it because it wasn't registered as an event, it never says "hey... why is that device is ON again? it's definitely between X and Y; and my last known state was OFF; what gives?" - i don't know if this would be too intensive on a HA blue to have something running in the background all the time, but i'd love to see something like this implemented in a future release; and could see multiple other use cases for it. If it already exists, mia culpa, I would definitely appreciate an explanation or documentation on how to set it up the way I'm imagining it. Much thanks!

twin sierra
#

If HA can see the state change it IS an event for HA. Thus you can just make an automation for it 🙂

You could even use the parent id and user id of the event. If both are None, the change happened outside of HA.

#

Example:

description: ""
mode: single
triggers:
  - trigger: state
    entity_id:
      - light.study_bulb
    to: "on"
conditions:
  - condition: template
    alias: Not by automation
    value_template: "{{ trigger.to_state.context.parent_id == None }}"
  - condition: template
    alias: Not by UI
    value_template: "{{ trigger.to_state.context.user_id == None }}"
  - condition: time
    after: "23:00:00"
    before: "07:00:00"
actions:
  - action: light.turn_off
    metadata: {}
    data: {}
    target:
      entity_id: light.study_bulb
spark gale
#

right but suppose the entity doesn't have a "state" field

#

there are plenty of objects like that out there, i've used helpers in the past to manually keep track of that, but you will still need a loop/deamon to check that variable continously

#

imho, a decidcated backend process would consume, hopefully, less than something running in the standard automation pool; just a thought

twin sierra
#

This also works with attributes. Third option would be it's only events but that's shit to control anyway...