Hi Folks,
I’m trying to automate my living space ventilation and have a problem with getting state variables within a @state_trigger
That is my code, it works generally as expected:
Status = state.get('switch.aus'), state.get('switch.tasmota_ac0bfbd9e600_switch_relay_3'), state.get('switch.tag'), state.get('switch.party')
Status
The output is ('off', 'off', 'on', 'off')
, which is the expeted state of the relais module in the working condition, right now.
Once I put it in a @state_trigger statement, it doesn’t work anymore:
@state_trigger('float(sensor.wohnung_co2) >= 1000 or float(sensor.lywsd03mmc_atc_hum) >= 60 or float(sensor.thx1_w230150x_hum_7) >= 60', watch='switch.aus, switch.tasmota_ac0bfbd9e600_switch_relay_3, switch.tag, switch.party')
Status = state.get('switch.aus'), state.get('switch.tasmota_ac0bfbd9e600_switch_relay_3'), state.get('switch.tag'), state.get('switch.party')
Status
The output is:
Exception in <jupyter_26> line 2:
Status = state.get('switch.aus'), state.get('switch.tasmota_ac0bfbd9e600_switch_relay_3'), state.get('switch.tag'), state.get('switch.party')
^
IndentationError: unexpected indent (jupyter_26, line 2)
Edited because of a Typo which leads to a Syntax Error
Where is my mistake? I use the watch-statement with the needed entities as suggested in the documentation. Any ideas?
Kind regards Ulli