Comparing entity state values #581
R5fan posted onGitHub
Im trying to compare two temperature sensor values in a current state node; one darksky outside temperature and one living room sensor. For some reason the test always results in False, regardless if I try <, >, <= or >=.
If I compare either sensor with a number I type in, it works fine. This may be my noobness, but Im stuck. This is the relevant part of the code:
[
{
"id": "66bbaa80.b522e4",
"type": "api-current-state",
"z": "c9c66103.680d8",
"name": "warmer inside",
"server": "469aa6d5.5063f8",
"version": 1,
"outputs": 2,
"halt_if": "sensor.living_temperature_2",
"halt_if_type": "entity",
"halt_if_compare": "gt",
"override_topic": true,
"entity_id": "sensor.dark_sky_temperature",
"state_type": "num",
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"blockInputOverrides": true,
"x": 300,
"y": 740,
"wires": [
[
"f0c4f7fb.ee2368",
"cb7ee5cd.f1e2b8"
],
[
"f3bac0df.21769",
"7130ecf9.6cc224"
]
]
},
{
"id": "469aa6d5.5063f8",
"type": "server",
"z": "",
"name": "Home Assistant"
}
]