Hi,
I’m going nuts trying to figure out what I’m doing wrong here.
I have an automation which triggers on camera motion detection and it should activate a switch which triggers a few other automations.
The thing is that when I look in the trace file of the automation it looks as though the switch is triggered correctly, but when I look at the switch history it hasn’t changed.
The switch is configured as such:
switch:
- platform: command_line
switches:
activate_recording_entre:
*/ Some Commands /*
value_template: "{{ value | regex_search('emulate_motion = on', ignorecase=True) }}"
friendly_name: Camera Entre Recording Activated`
Here is the trace of the automation:
Executed: 14 november 2021 17:15:55
Result:
params:
- domain: switch*
- service: turn_on*
- service_data:*
- entity_id: switch.activate_recording_entre*
- target: {}*
running_script: false
limit: 10
As it looks, the switch.activate_recording_entre seems to be “turned_on”.
I cannot understand however why activate_recording_entre is never shown as “on” in the history.
I have also noted that if I try to force the switch.activate_recording_entre to “on” using lovelace it deafults back to “off” after just a few seconds, which I think means it actually never get sets (i.e. it resets when it reads the state and sees that it is “off”)
Also, this has worked before, but I recently reinstalld HomeAssistant to get 64 bit. I did not use any backup restore, instead I just copy-pasted the old .yaml files.
Any help would be much appreciated!