which was prematurely closed (why cant we further broaden our minds/suggestions, even if a supposed current technique provides a workaround for the original Post? this is WTH after all??
ha, you’re right there. was a C&P error from my log selector. I’ve edited the first post. thanks
but that doesn’t help here, the template isnt correct.
this is what I want to do:
- alias: Set Debug Level on
id: Set Debug Level on
trigger:
platform: state
entity_id: input_boolean.debug_level
to: 'on'
condition:
condition: template
value_template: >
{{trigger.to_state is not none and
trigger.from_state is not none and
trigger.to_state.state != trigger.from_state.state}}
action:
service: logger.set_level
data:
homeassistant.core: info
homeassistant.components.script: debug
homeassistant.components.automation: debug
- alias: Set Debug Level off
id: Set Debug Level 0ff
trigger:
platform: state
entity_id: input_boolean.debug_level
to: 'off'
condition:
condition: template
value_template: >
{{trigger.to_state is not none and
trigger.from_state is not none and
trigger.to_state.state != trigger.from_state.state}}
action:
service: logger.set_level
data:
homeassistant.core: error
homeassistant.components.script: error
homeassistant.components.automation: error
but then in 1 automation based on the {{trigger.to_state.state}}