I am trying to create a flow to change lights based on an input_datetime. The input is formatted as “08:00” however the switch is not working when the messages match exactly.
If there is a better way to do this or if it would be better to do this in YAML, I am open.
[
{
"id": "674f6be2.6c6494",
"type": "tab",
"label": "Flow 2",
"disabled": false,
"info": ""
},
{
"id": "cb8c5189.b5aac",
"type": "poll-state",
"z": "674f6be2.6c6494",
"name": "",
"server": XXXXXXX,
"version": 1,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"updateinterval": "60",
"updateIntervalUnits": "seconds",
"outputinitially": false,
"outputonchanged": false,
"entity_id": "input_datetime.alarm_time",
"state_type": "str",
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"x": 240,
"y": 240,
"wires": [
[
"6c35d030.0433"
]
]
},
{
"id": "b2073181.b0f6a",
"type": "switch",
"z": "674f6be2.6c6494",
"name": "",
"property": "time",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "alarm",
"vt": "msg"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 710,
"y": 240,
"wires": [
[]
]
},
{
"id": "921e7a2a.b2b478",
"type": "moment",
"z": "674f6be2.6c6494",
"name": "",
"topic": "",
"input": "",
"inputType": "msg",
"inTz": "America/Chicago",
"adjAmount": 0,
"adjType": "days",
"adjDir": "add",
"format": "HH:mm",
"locale": "C",
"output": "time",
"outputType": "msg",
"outTz": "America/Chicago",
"x": 460,
"y": 160,
"wires": [
[
"b2073181.b0f6a"
]
]
},
{
"id": "e993a393.2c5c8",
"type": "inject",
"z": "674f6be2.6c6494",
"name": "",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "60",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"x": 190,
"y": 160,
"wires": [
[
"921e7a2a.b2b478"
]
]
},
{
"id": "6c35d030.0433",
"type": "moment",
"z": "674f6be2.6c6494",
"name": "time -30",
"topic": "",
"input": "",
"inputType": "msg",
"inTz": "America/Chicago",
"adjAmount": ".5",
"adjType": "hours",
"adjDir": "subtract",
"format": "HH:mm",
"locale": "C",
"output": "alarm",
"outputType": "msg",
"outTz": "America/Chicago",
"x": 460,
"y": 240,
"wires": [
[
"b2073181.b0f6a"
]
]
},
{
"id": "3185f61a.da521a",
"type": "server",
"z": "",
"name": "Home Assistant",
"legacy": false,
"addon": true,
"rejectUnauthorizedCerts": true,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": true,
"cacheJson": true
}
]