Once again, I need your help. As I mentioned in my first post, I have poor programming skills. I’m currently trying to change the state of an entity in an automation. The state ‘wash’ exists. The sensor changes from ‘idle’ to ‘wash’ when I manually trigger it. What is the error in this code?
trigger:
- platform: state
entity_id:
- input_boolean.start
from: "off"
to: "on"
condition: []
action:
- service: homeassistant.update_entity
target:
entity_id: sensor.152832116377692_progress
data:
state: wash
mode: single
When I test this, the following error message appears: extra keys not allowed @ data[‘state’]. Got None
There is no data. update_entity tells the entity to update itself, you can’t force it to accept a state it does not have. Show how you defined sensor.152832116377692_progress
I didn’t define the sensor in the code at all. And it only has ICON and Friendly_Name as attributes. Do I need to define it in the code? And if yes, as what? Thank you very much for your help.
The integration of the washing machine only provides the option to turn it on, but there is no option to start it. When I start it manually, the sensor switches from ‘Ready’ to ‘Washing’."