fix: Map climate idle to idle instead of off in Home Assistant (#19545)

* Missing HA Climate Idle state

Idle is mapped to idle state in HA

* Update homeassistant.test.js
This commit is contained in:
Arne Rekdal
2023-11-03 20:14:25 +01:00
committed by GitHub
parent 1f2bd841c4
commit 64b26e47da
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -261,7 +261,7 @@ export default class HomeAssistant extends Extension {
discoveryEntry.mockProperties.push({property: state.property, value: null});
discoveryEntry.discovery_payload.action_topic = true;
discoveryEntry.discovery_payload.action_template = `{% set values = ` +
`{None:None,'idle':'off','heat':'heating','cool':'cooling','fan_only':'fan'}` +
`{None:None,'idle':'idle','heat':'heating','cool':'cooling','fan_only':'fan'}` +
` %}{{ values[value_json.${state.property}] }}`;
}
+1 -1
View File
@@ -785,7 +785,7 @@ describe('HomeAssistant extension', () => {
let payload;
payload = {
"action_template":"{% set values = {None:None,'idle':'off','heat':'heating','cool':'cooling','fan_only':'fan'} %}{{ values[value_json.running_state] }}",
"action_template":"{% set values = {None:None,'idle':'idle','heat':'heating','cool':'cooling','fan_only':'fan'} %}{{ values[value_json.running_state] }}",
"action_topic":"zigbee2mqtt/TS0601_thermostat",
"availability":[
{