You can use the date time format node to parse and convert the time to a usable format. Then send that value through a switch node. In the following flow you would set the inject node to fire after midnight. It will convert to a 3 number value (hmm
). You can use any format moment supports.
[{"id":"336bb951.7b1376","type":"inject","z":"d6a46901.ebee1","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"str","x":270,"y":540,"wires":[["5e6a99b2.20e07"]]},{"id":"5e6a99b2.20e07","type":"api-current-state","z":"d6a46901.ebee1","name":"","server":"6b1110b5.183a4","version":2,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.pixel_3_next_alarm","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":520,"y":540,"wires":[["17064c5b.95395c"]]},{"id":"17064c5b.95395c","type":"moment","z":"d6a46901.ebee1","name":"","topic":"","input":"","inputType":"msg","inTz":"America/New_York","adjAmount":0,"adjType":"days","adjDir":"add","format":"hmm","locale":"C","output":"","outputType":"msg","outTz":"America/New_York","x":840,"y":540,"wires":[["28770132.5262be"]]},{"id":"28770132.5262be","type":"switch","z":"d6a46901.ebee1","name":"","property":"payload","propertyType":"msg","rules":[{"t":"gte","v":"450","vt":"str"},{"t":"lt","v":"450","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1110,"y":540,"wires":[[],[]]},{"id":"6b1110b5.183a4","type":"server","name":"Home Assistant","version":1,"legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
https://momentjs.com/docs/#/displaying/format/