Cooling routine related to IR devices

Hello team,

I implemented a broadlink RM4 yesterday (with humidity and temp sensor cable). I'm interested to see your cooling or heating routines for dumb cooling/heating devices based on IR control where the devices state is not really known (ie it can get out of sync).

Here is my basic routine. Hoping to see what others have done.

[{"id":"dc5d5e8a.38c25","type":"comment","z":"58a75624.a4048","name":"daikin climate","info":"","x":190,"y":440,"wires":[]},{"id":"bc215d4a.04fd28","type":"poll-state","z":"58a75624.a4048","name":"upstairs temperature","server":"8b533b83.ade2f8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"5","updateIntervalUnits":"minutes","outputinitially":false,"outputonchanged":false,"entity_id":"sensor.broadlink_temperature","state_type":"str","halt_if":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"x":170,"y":500,"wires":[["69bcae1a.2dece"]]},{"id":"69bcae1a.2dece","type":"switch","z":"58a75624.a4048","name":"<72f to >75f","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"75","vt":"num"},{"t":"lt","v":"72","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":390,"y":500,"wires":[["fa27cdb6.6eade8"],["a7adedce.ee5dc8"]]},{"id":"a3260832.bd5968","type":"api-call-service","z":"58a75624.a4048","name":"daikin (power toggle)","server":"8b533b83.ade2f8","version":1,"debugenabled":false,"service_domain":"switch","service":"toggle","entityId":"switch.daikin_mini_split","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":820,"y":500,"wires":[[]]},{"id":"a7adedce.ee5dc8","type":"api-current-state","z":"58a75624.a4048","name":"daikin on?","server":"8b533b83.ade2f8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.daikin_mini_split","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":590,"y":540,"wires":[["a3260832.bd5968","291d667a.90df72"],[]]},{"id":"fa27cdb6.6eade8","type":"api-current-state","z":"58a75624.a4048","name":"daikin off?","server":"8b533b83.ade2f8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.daikin_mini_split","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":590,"y":460,"wires":[["a3260832.bd5968","89129db4.5f1b1"],[]]},{"id":"89129db4.5f1b1","type":"debug","z":"58a75624.a4048","name":"on?","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":860,"y":440,"wires":[]},{"id":"291d667a.90df72","type":"debug","z":"58a75624.a4048","name":"off?","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":800,"y":600,"wires":[]},{"id":"8b533b83.ade2f8","type":"server","name":"Home Assistant","addon":true}]

As you can see in my basic routine; I'm making a flawed assumption that HA actually knows the real state of the daikin mini-split. I am working to improve this with some better logic. My current idea is to add a 5 minute delay node after the daikin on and off nodes, take a reading of the room temp and if greater than a set point, toggle power again. That said hoping others have a better idea they'd share.

Can you only toggle the power rather than switching off or on?

that's an interesting topic. When I learned the IR codes, I actually got two different b64 values. However I can use either of them to turn off or on. Not sure what's up with that.

the daikin remote has 1 power on/off button.

If you can only toggle it I think your idea is doomed to failure. Consider with your suggestion of waiting 5 minutes and checking the temperature again, what would happen on a hot day that didn't need any heating?
If you can get a sensor onto the device being switched and detect whether it is running in some way, a photo-led watching an led or a temperature sensor on the device itself showing whether it is heating or not, then you could make it work.
Does the device not have a real interface of some sort?

I'm not sure. It's a daikin mini split that doesn't appear to have support for their wifi / cloud module.