@Kermit For some reason, I can’t get this working. See this pic:
On the right side you will see the entity reporting the temperature is above 72 but for some reason the current_state
is reporting it as false
.
This is the JSON for this flow:
[
{
"id": "70d573ad10d4d31a",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "9c53dfbbdcaa5b40",
"type": "inject",
"z": "70d573ad10d4d31a",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 380,
"wires": [
[
"6347ad1c5c0474d1"
]
]
},
{
"id": "6347ad1c5c0474d1",
"type": "api-current-state",
"z": "70d573ad10d4d31a",
"name": "",
"server": "e593dd3.052432",
"version": 3,
"outputs": 2,
"halt_if": "$entity().attributes.attributes.temperature >= 72",
"halt_if_type": "jsonata",
"halt_if_compare": "jsonata",
"entity_id": "weather.home",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 240,
"y": 260,
"wires": [
[
"1f96d51fcb670fd3"
],
[
"1653a7bafc993167"
]
]
},
{
"id": "1f96d51fcb670fd3",
"type": "debug",
"z": "70d573ad10d4d31a",
"name": "debug 14",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 400,
"y": 160,
"wires": []
},
{
"id": "1653a7bafc993167",
"type": "debug",
"z": "70d573ad10d4d31a",
"name": "debug 15",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 400,
"y": 380,
"wires": []
},
{
"id": "e593dd3.052432",
"type": "server",
"name": "Home Assistant",
"addon": true
}
]
I have changed the debug
node to debug the whole object and see … the temperature is at 78 why is the current_state
still saying is false
? I don’t get it. What I am missing and not understanding here?