Flow Details
The flow is designed to do the following:
- Display the Status, Set Temperature & Current Temperature of a Home Assistant Climate Entity
- Icon changes with mode
- Display the Status of a Door Sensor (Door Group Sensor used in flow)
- Door Icon and Text changes with State
- Outputs to two different Awtrix Displays
Both of the below overwrite the same Awtrix Custom App. You can separate by creating a different Custom App for each.
Climate
- Change details of [Liv Air Conditioning] to your climate entity, server and node name
- Change details of [Get Climate] to your climate entity and server
- Change details of [awtrix_lounge/custom/climate MQTT] to your MQTT Server
- Topic: [your_awtrix_display/custom/app_name]
Climate
- Change details of [Liv Air Conditioning] to your climate entity, server and node name
- Change details of [Get Climate] to your climate entity and server
- Change details of [awtrix_lounge/custom/climate MQTT] to your MQTT Server
- Topic: [your_awtrix_display/custom/app_name]
Door
- Change details of [Middle Floor Sensors] to your door group sensor or contact sensor
- Change details of [Get Door] to your door entity and server
- Change details of [awtrix_lounge/custom/climate MQTT] to your MQTT Server
- Topic: [your_awtrix_display/custom/app_name]
- There is a door closed icon and state, to display change state of [Get Door]
[{"id":"fbbd6e4777199e66","type":"group","z":"c29e36f478fc3db8","name":"A/C Climate & Door Notification","style":{"label":true},"nodes":["9596b14d18b2f04c","a09adc0bf4302d64","582cd1ba20f1e77a","111355bc717673b4","cdc6de95b2e0d55a","9b8bf4aab3ff944d","e37a961411257fe7","600cb9a5f030fa4f","7ab953dfff79fd27"],"x":114,"y":299,"w":1312,"h":162},{"id":"9596b14d18b2f04c","type":"api-current-state","z":"c29e36f478fc3db8","g":"fbbd6e4777199e66","name":"Get Climate","server":"bb380e72.b8825","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"climate.air_conditioning","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":530,"y":340,"wires":[["a09adc0bf4302d64"]]},{"id":"a09adc0bf4302d64","type":"function","z":"c29e36f478fc3db8","g":"fbbd6e4777199e66","name":"Format Climate A/C Message","func":"var state = msg.data.state;\nvar iconMap={\n \"off\": \"657\",\n \"auto\": \"6546\",\n \"heat\": \"11605\",\n \"cool\": \"11606\",\n \"heat_cool\": \"23407\",\n \"dry\": \"55053\",\n \"fan_only\": \"55022\",\n};\nvar iconId = iconMap[state.toLowerCase()] || \"16754\"\n\nvar settemperature = msg.data.attributes.temperature;\nvar currenttemperature = msg.data.attributes.current_temperature;\nvar humidity = msg.data.attributes.current_humidity;\nvar mode = msg.data.attributes.hvac_action;\n\nmsg.payload = {\n \"text\": `${mode} ${settemperature} : ${currenttemperature}°C`,\n \"textCase\": 1,\n \"icon\": `${iconId}`, // Change based on your icon system\n \"rainbow\": false,\n \"pushIcon\": 0,\n \"repeat\": 3\n};\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":800,"y":340,"wires":[["582cd1ba20f1e77a","111355bc717673b4"]]},{"id":"582cd1ba20f1e77a","type":"mqtt out","z":"c29e36f478fc3db8","g":"fbbd6e4777199e66","name":"awtrix_lounge/custom/climate MQTT","topic":"awtrix_lounge/custom/climate","qos":"2","retain":"false","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"34f7583aa6e3efb2","x":1250,"y":340,"wires":[]},{"id":"111355bc717673b4","type":"mqtt out","z":"c29e36f478fc3db8","g":"fbbd6e4777199e66","name":"awtrix_bedroom/custom/climate MQTT","topic":"awtrix_bedroom/custom/climate","qos":"2","retain":"false","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"34f7583aa6e3efb2","x":1250,"y":400,"wires":[]},{"id":"cdc6de95b2e0d55a","type":"server-state-changed","z":"c29e36f478fc3db8","g":"fbbd6e4777199e66","name":"Liv Air Conditioning","server":"bb380e72.b8825","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["climate.air_conditioning"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":230,"y":340,"wires":[["9596b14d18b2f04c"]]},{"id":"9b8bf4aab3ff944d","type":"api-current-state","z":"c29e36f478fc3db8","g":"fbbd6e4777199e66","name":"Get Door","server":"bb380e72.b8825","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"binary_sensor.middle_floor_sensor_group","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":520,"y":420,"wires":[["e37a961411257fe7"],["9596b14d18b2f04c"]]},{"id":"e37a961411257fe7","type":"function","z":"c29e36f478fc3db8","g":"fbbd6e4777199e66","name":"Format Door Message","func":"var state = msg.data.state;\nvar iconMap = {\n \"off\": \"9767\",\n \"on\": \"50061\",\n};\nvar iconId = iconMap[state.toLowerCase()] || \"16754\";\n\nvar stateMap = {\n \"off\": \"DOOR CLOSED\",\n \"on\": \"DOOR OPEN\",\n};\nvar stateText = String(stateMap[state.toLowerCase()] || \"UNKNOWN STATE\");\n\nmsg.payload = {\n \"text\": `${stateText}`,\n \"textCase\": 1,\n \"icon\": `${iconId}`, // Change based on your icon system\n \"rainbow\": false,\n \"pushIcon\": 0,\n \"stack\": false,\n \"repeat\": 3\n};\n\nreturn msg;\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":420,"wires":[["582cd1ba20f1e77a","111355bc717673b4"]]},{"id":"600cb9a5f030fa4f","type":"server-state-changed","z":"c29e36f478fc3db8","g":"fbbd6e4777199e66","name":"Middle Floor Sensors","server":"bb380e72.b8825","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.middle_floor_sensor_group"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":240,"y":420,"wires":[["9b8bf4aab3ff944d"]]},{"id":"7ab953dfff79fd27","type":"inject","z":"c29e36f478fc3db8","g":"fbbd6e4777199e66","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"300","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":250,"y":380,"wires":[["9b8bf4aab3ff944d"]]},{"id":"bb380e72.b8825","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true},{"id":"34f7583aa6e3efb2","type":"mqtt-broker","name":"core-mosquitto: 1883 192.168.2.40","broker":"core-mosquitto","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"autoUnsubscribe":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""}]
-- Flow first published on February 12, 2025, last updated on February 12, 2025 at 11:46.