Hi everybody.
Enjoying HA.
Trying to make use of a REST sensor.
But it does not work Can anyone guide me where I’m wrong?
I’ve got the following:
- platform: rest
name: JSON Climaxalarm
resource: ‘http://user:[email protected]/action/panelCondGet’
json_attributes:
- mode_a1
value_template: ‘{{ value_json.climaxalarm }}’- platform: template
sensors:
climaxalarm_status:
friendly_name: ‘Mode’
value_template: ‘{{ states.sensor.json_climaxalarm.attributes[“updates”][“mode_a1”] }}’
If I do a cURL of the url I get this:
{
“updates” : {
“mode_a1” : “Disarm”,
“mode_a2” : “Disarm”,
“mode_a3” : “Disarm”,
“mode_a4” : “Disarm”,
“mode_a5” : “Disarm”,
“battery_ok” : “1”,
“battery” : “Normal”,
“tamper_ok” : “1”,
“tamper” : “N/A”,
“interference_ok” : “1”,
“interference” : “Normal”,
“ac_activation_ok” : “1”,
“ac_activation” : “Normal”,
“sys_in_inst”: “System in maintenance”,
“rssi” : “1”,
“sig_gsm_ok” : “1”,
“sig_gsm” : “N/A”
}
}
But the output of the climaxalarm_status is ‘Unknown’
Log says:
2019-07-20 15:42:12 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.climaxalarm_status, old_state=None, new_state=<state sensor.climaxalarm_status=unknown; friendly_name=Mode @ 2019-07-20T15:42:12.891921+02:00>>
2019-07-20 15:42:13 DEBUG (SyncWorker_12) [homeassistant.components.rest.sensor] Updating from http://user:[email protected]/action/panelCondGet
Any takes on why the ‘Mode’ is ‘Unknown’?
Thanks in advance!