shaonianzhentan / node-red-contrib-ha-mqtt

在HomeAssistant中生成MQTT实体
https://github.com/shaonianzhentan/node-red-contrib-ha-mqtt
MIT License
37 stars 19 forks source link

How to use attributes on Binary Sensor #28

Open dabene1408 opened 1 year ago

dabene1408 commented 1 year ago

Hi, i'm new to this great Plugin and I wonder how to use the attributes Object on a Binary Sensor. Does this change/override the Configuration in the Sensor?

shaonianzhentan commented 1 year ago

This is a basic rule that applies to almost all nodes

msg.payload=state msg.attributes={ "key": "value" }