I’m trying to set a schedule for an air purifier. As well as being on/off at certain time I need to change the Mode attribute of the air purifier at different times of the day.
My schedule is as follows (defined in UI so no YAML available):
My automation is as follows:
- id: "1736946889366"
alias: Lounge Purifier Scheduler
description: ""
triggers:
- trigger: state
entity_id:
- schedule.lounge_purifier
conditions: []
actions:
- if:
- condition: state
entity_id: schedule.lounge_purifier
state: "on"
then:
- type: turn_on
device_id: f258b002dc83cd56d74794f10749b51c
entity_id: 7dda71bdcbb662bae31c906906399da8
domain: switch
- device_id: f258b002dc83cd56d74794f10749b51c
domain: select
entity_id: 35f4b5b7ecb7c16b68ee79f273a351ad
type: select_option
option: "{{ state_attr('schedule.lounge_purifier', 'mode') }}"
else:
- type: turn_off
device_id: f258b002dc83cd56d74794f10749b51c
entity_id: 7dda71bdcbb662bae31c906906399da8
domain: switch
mode: single
However I get the error:
Error: Option {{ state_attr('schedule.lounge_purifier', 'mode') }} is not valid for entity select.air_purifier_1_mode, valid options are: Off, Auto, Eco, Max, Low, Med, High
What is going wrong here?
1 post - 1 participant