I thought I had it all figured out until Power outage when the wall plug switch defaulted to ON and then the flow I was using became useless.So I am back here relying on your kindness :)
I have tried to implement something between what Walter Kraembring and AIOT MAKER suggested but I guess I need to check what the current status of the wall plug switch is and then proceed further.
I am currently using Fred and ramp-thermostat can't be installed but the example with it would be nice as I may consider moving the flow to my Pi
So Here is my current flow:
[{"id":"e47893eb.402fa","type":"inject","z":"c05a9503.0c154","name":"18","topic":"","payload":"{\"Id\":\"ID\",\"Name\":\"AirConditioner( MITSUBISHI ELECTRIC MSZ-FH25VE)\",\"Serial\":\"Serial\",\"DeviceEnergyType\":1,\"FamilyType\":1,\"ActivePower\":0.00068,\"ActivePowerUnit\":\"kW\",\"CounterReading\":1632.542,\"CounterReadingUnit\":\"kWh\",\"CounterReadingT1\":1632.542,\"SwitchOn\":true,\"Voltage\":248.9,\"VoltageL1\":248.9,\"Current\":0.022,\"PowerFactor\":0.123,\"PowerFactorL1\":0.123,\"Temperature\":18,\"ValueDate\":\"2018-03-14T16:36:33.416476\"}","payloadType":"json","repeat":"","crontab":"","once":false,"x":110,"y":540,"wires":[["ba3e2c9.e64ccd"]]},{"id":"688395ea.7cccdc","type":"debug","z":"c05a9503.0c154","name":"","active":true,"console":"false","complete":"true","x":890,"y":780,"wires":[]},{"id":"de514b92.b47b78","type":"debug","z":"c05a9503.0c154","name":"","active":true,"console":"false","complete":"true","x":890,"y":720,"wires":[]},{"id":"34f18912.1aaca6","type":"inject","z":"c05a9503.0c154","name":"21.5","topic":"","payload":"{\"Id\":\"ID\",\"Name\":\"AirConditioner( MITSUBISHI ELECTRIC MSZ-FH25VE)\",\"Serial\":\"Serial\",\"DeviceEnergyType\":1,\"FamilyType\":1,\"ActivePower\":0.00068,\"ActivePowerUnit\":\"kW\",\"CounterReading\":1632.542,\"CounterReadingUnit\":\"kWh\",\"CounterReadingT1\":1632.542,\"SwitchOn\":true,\"Voltage\":248.9,\"VoltageL1\":248.9,\"Current\":0.022,\"PowerFactor\":0.123,\"PowerFactorL1\":0.123,\"Temperature\":21.5,\"ValueDate\":\"2018-03-14T16:36:33.416476\"}","payloadType":"json","repeat":"","crontab":"","once":false,"x":110,"y":580,"wires":[["ba3e2c9.e64ccd"]]},{"id":"953da161.fa063","type":"inject","z":"c05a9503.0c154","name":"23","topic":"","payload":"{\"Id\":\"ID\",\"Name\":\"AirConditioner( MITSUBISHI ELECTRIC MSZ-FH25VE)\",\"Serial\":\"Serial\",\"DeviceEnergyType\":1,\"FamilyType\":1,\"ActivePower\":0.00068,\"ActivePowerUnit\":\"kW\",\"CounterReading\":1632.542,\"CounterReadingUnit\":\"kWh\",\"CounterReadingT1\":1632.542,\"SwitchOn\":true,\"Voltage\":248.9,\"VoltageL1\":248.9,\"Current\":0.022,\"PowerFactor\":0.123,\"PowerFactorL1\":0.123,\"Temperature\":23,\"ValueDate\":\"2018-03-14T16:36:33.416476\"}","payloadType":"json","repeat":"","crontab":"","once":false,"x":110,"y":620,"wires":[["ba3e2c9.e64ccd"]]},{"id":"ba3e2c9.e64ccd","type":"function","z":"c05a9503.0c154","name":"Temp only","func":"msg.payload = msg.payload.Temperature;\nreturn msg;","outputs":1,"noerr":0,"x":290,"y":540,"wires":[["f317c453.45bc5"]]},{"id":"f317c453.45bc5","type":"switch","z":"c05a9503.0c154","name":"","property":"payload","propertyType":"msg","rules":[{"t":"gte","v":"21","vt":"num"},{"t":"lt","v":"21","vt":"str"},{"t":"gt","v":"22","vt":"num"},{"t":"lte","v":"22","vt":"str"}],"checkall":"true","outputs":4,"x":150,"y":740,"wires":[["172e4e26.c22e92"],["fddaae27.5e05b"],["e8890ada.59b838"],["aa5697a4.2ba36"]]},{"id":"fddaae27.5e05b","type":"trigger","z":"c05a9503.0c154","op1":"","op2":"","op1type":"nul","op2type":"pay","duration":"5","extend":false,"units":"s","reset":"stop low","name":"Activate Low","x":510,"y":720,"wires":[["cd9e7b62.03843"]]},{"id":"e8890ada.59b838","type":"trigger","z":"c05a9503.0c154","op1":"","op2":"","op1type":"nul","op2type":"pay","duration":"5","extend":false,"units":"s","reset":"stop high","name":"Activate High","x":510,"y":780,"wires":[["d3d50d57.1542d8"]]},{"id":"172e4e26.c22e92","type":"change","z":"c05a9503.0c154","name":"Stop Low","rules":[{"t":"set","p":"payload","pt":"msg","to":"stop low","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":700,"wires":[["fddaae27.5e05b"]]},{"id":"d3d50d57.1542d8","type":"change","z":"c05a9503.0c154","name":"Set to 0 (OFF)","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"DeviceID\":\"0b625d5d-ac87-4e9b-80b9-6c4d1aa61f9e\",\"Actions\":[{\"ObisCode\":\"63000C0001FF\",\"Value\":0}]}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":780,"wires":[["688395ea.7cccdc"]]},{"id":"cd9e7b62.03843","type":"change","z":"c05a9503.0c154","name":"Set to 1 (ON) ","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"DeviceID\":\"0b625d5d-ac87-4e9b-80b9-6c4d1aa61f9e\",\"Actions\":[{\"ObisCode\":\"63000C0001FF\",\"Value\":1}]}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":690,"y":720,"wires":[["de514b92.b47b78"]]},{"id":"eee968cc.9687","type":"smooth","z":"c05a9503.0c154","name":"","property":"payload","action":"mean","count":"10","round":"1","mult":"single","x":380,"y":620,"wires":[[]]},{"id":"aa5697a4.2ba36","type":"change","z":"c05a9503.0c154","name":"Stop High","rules":[{"t":"set","p":"payload","pt":"msg","to":"stop high","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":800,"wires":[["e8890ada.59b838"]]},{"id":"63571ec5.0e99c8","type":"comment","z":"c05a9503.0c154","name":"left out for testing ","info":"","x":540,"y":620,"wires":[]}]