Hi
I’m trying to extract data from my AC unit i want to see what fan mode status it is on and temp its set to, I have tried to put a switch in there but not sure what I am doing wrong just seeing if anyone can help me out happy to send more pictures if needed been doing my head in
Thanks in Advance
What’s the purpose of the “switch node” in this example? How do you want this data output?
The data extraction can be achieved by a function node or a change node.
I’m not sure what to use to extract the data I haven’t used many function nodes so I’m not sure exactly how to write it, I want to use the data to send to a modbus hmi. I only put a switch node in after reading a few things on here and wasn’t sure what to do with it, if anyone has an example that would be great how to write the change node or function node
I don’t think switch node is what you’re looking for.
If you just hook up the event state node to a debug node and set the debug node to be complete msg object, you will see the attributes.
If you want to use those attributes for something you will need to extract them out with a change node or function node.
Keep it easy.
Event state node > change node, set msg.payload to msg.data.new_state.attributes.fan_mode then output it to a debug node.
Now your payload has that attribute.
Thanks very much for that got it working