@kiwijunglist Just a hint: The styling of a headline at the documentation is in uppercase. You can use the service name in lower case too: fan.xiaomi_miio_set_favorite_level
cheers, Iām new to all of this, just started automations yesterday, and Iām not in the IT profession
when Iām writing automations, I make frequent syntax mistakes (eg too many spaces, or forget a colon or something like that). To quick check my automation.yaml is correct I click reload automations and if there is an error then it shows up as a persistant notification is hass.
however Iād quite like to know what line # my error is on, when I use check config in hassio, it frequently only tells me the line # error in the configutation file that corresponds to automation: !include automations.yaml , is there a trick to making my life easier?
The only thing left Iād like to do is have the pull down automatically changed if a automation or the mi home app changes the mode. I know this shouldnāt be too hard but Im having difficulties finding some good instructions or code to copy. Can someone point me in the right direction?
Edit: sinker1345 on the discord came up with this for me:
alias: Set input select on Xiaomi mode HIDE
trigger:
platform: state
entity_id: sensor.bedroom_air_purifier_mode
to: āautoā
platform: state
entity_id: sensor.bedroom_air_purifier_mode
to: āfavoriteā
platform: state
entity_id: sensor.bedroom_air_purifier_mode
to: āsilentā
platform: state
entity_id: sensor.bedroom_air_purifier_mode
to: āidleā
action:
service: input_select.select_option
data_template:
entity_id: input_select.xiaomi_mode
option: >
{% if states.sensor.bedroom_air_purifier_mode.state == āautoā %}
auto
{% endif %}
{% if states.sensor.bedroom_air_purifier_mode.state == āfavoriteā %}
favorite
{% endif %}
{% if states.sensor.bedroom_air_purifier_mode.state == āsilentā %}
silent
{% endif %}
{% if states.sensor.bedroom_air_purifier_mode.state == āidleā %}
idle
{% endif %}
How do you get the token of ZNCZ02CM ?
I have the same but Iām spending my whole day to looking for a method.
Older versions of mi home doesnāt support for ZNCZ02CM, isnt it?