Manually triggered automation advice

I have a few Midea AC units integrated using the cloudfree/ESPHome dongles. I don’t want some family members to have full control of the units (we have the remotes put up as well). I want a simple button or similar they can hit that will lower the temp a few degrees for 60-90 minutes and return to the previous settings after the timer is up.

I also have nodered and this seems simple in theory but I can’t figure out how to do this (or even get a trigger button) in HA to get started using native automation. On the nodered side I also can’t figure out how to get started.

I understand all the logic and steps involved (in node red) once I figure out how to get a button. One thing I’m not sure about is I don’t want it cheatable. For example, if it is a switch or a button press, I don’t want it to have the ability to be toggled to extend the time. Ideally, after the 60-90 minutes I would like to have a 30 minute lockout on the trigger so it can’t be reactivated immediately.

Thanks!

I don’t use node red or know much about it, but you may find this helpful:

If you stay native HA, you would create a script and have the button call the script (either directly with script.my_script_name or use the script.turn_on service)

The Button node creates a button in Home Assistant that can be added to a dashboard. It restricts button presses to once every 2 hours. When pressed, it saves the current temperature, decreases it by 2 degrees, and after 90 minutes, restores the temperature to its original value.

[{"id":"dda8df1fec89dc7b","type":"ha-button","z":"9a79489c7caa0be9","name":"","version":0,"debugenabled":false,"outputs":1,"entityConfig":"","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":158,"y":224,"wires":[["ebe740cb1f52f9e5"]]},{"id":"12a8ae236033c050","type":"api-call-service","z":"9a79489c7caa0be9","name":"set temp to current temp - 2","server":"","version":7,"debugenabled":false,"action":"climate.set_temperature","floorId":[],"areaId":[],"deviceId":[],"entityId":["climate.hvac"],"labelId":[],"data":"{\"temperature\": temp - 2 }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":true,"domain":"climate","service":"set_temperature","x":744,"y":224,"wires":[["08a32bfdf28c4450"]]},{"id":"08a32bfdf28c4450","type":"delay","z":"9a79489c7caa0be9","name":"","pauseType":"delay","timeout":"90","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":954,"y":224,"wires":[["229868d42c5a7643"]]},{"id":"ebe740cb1f52f9e5","type":"delay","z":"9a79489c7caa0be9","name":"2 hour cooldown","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"2","rateUnits":"hour","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"allowrate":false,"outputs":1,"x":314,"y":224,"wires":[["ed0e608eb1174a65"]]},{"id":"ed0e608eb1174a65","type":"api-current-state","z":"9a79489c7caa0be9","name":"save current temp","server":"","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"climate.hvac","state_type":"str","blockInputOverrides":true,"outputProperties":[{"property":"temp","propertyType":"msg","value":"$number($entity().attributes.temperature)","valueType":"jsonata"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":518,"y":224,"wires":[["12a8ae236033c050"]]},{"id":"229868d42c5a7643","type":"api-call-service","z":"9a79489c7caa0be9","name":"reset temp","server":"","version":7,"debugenabled":false,"action":"climate.set_temperature","floorId":[],"areaId":[],"deviceId":[],"entityId":["climate.hvac"],"labelId":[],"data":"{\"temperature\": temp }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":true,"domain":"climate","service":"set_temperature","x":1114,"y":224,"wires":[[]]}]

Thanks for the flow. But this leaves me at square one as before. The button does not show up as an HA entity. I also have a helper with the same name that I can’t delete. I added the helper button through the guided UI. If I go back to the helpers, I see it, but no option to delete. edit I found the delete option and removed this similarly named helper.

NodeRed is pulling and pushing other information through HA without issue, but none of these are buttons, mostly gauges, binary sensors, and such…

image

Do you have Node-RED companion custom component installed in Home Assistant?

https://github.com/zachowj/hass-node-red

I do. It’s very dated (literally v1) and I’ve been scared to update because the things I do have in place work just fine lol. I guess it is time. …I’ll report back. Hopefully I’ll get time this weekend.

This was a great starting point. I was too out of date. I added a few things. No more finding out a unit has been on 65 for a week and nobody knows why. haha. Thanks!