I’m brand new to home assistant and I am working on my first Node Red automation. I want to use one button on my remote to change the speed of a ceiling fan connected to a GE Smart Fan Control switch. I’m using a Node Red switch to iterate through the speeds when an event I created is fired. I want to configure this so that I can pass in the fan entity and the current speed (so I can re-use this for several other fans in the house). I am able to pass in the entity, process it, and call a service to change the speed. What I can’t figure out is how to pass the value of the state attribute for the fan speed into my event. I am testing this by sending the event in the developer tools and looking at the debug node in Node Red to examine the msg.payload.
Event Type
home.fan_speed_inc
Event Data
1 entity_id: fan.my_fan_level
2 speed: {{ state_attr(“fan.my_fan_level”, “speed”) }}
This results in a null object being received on the node red side for speed.
When I add fan.my_fan_level to the dashboard it shows a toggle switch. If I click on it to inspect it, I see it has an attribute called Speed. Capitalization of speed doesn’t affect the output of my event.
I’ve tried several different things and have done a decent amount of digging, but can’t find verification that I can do what I am trying to do here. Any advice would be appreciated.
Thanks