Update zigbee-herdsman-converters to 13.0.4 (#5095)

* Update zigbee-herdsman-converters to 13.0.4

* Update homeassistant.js

* Update homeassistant.js

* Update homeassistant.js

Co-authored-by: Koenkk <Koenkk@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
This commit is contained in:
authored and GitHub committed 2020-11-26 20:12:09 +01:00
1 parent 99207358d5
commit ab8035d6bb
3 files changed
+20 -18

No files matched your search

+16 -14
View File
@@ -182,10 +182,6 @@ class HomeAssistant extends Extension {
assert(setpoint, 'No setpoint found');
const temperature = expose.features.find((f) => f.name === 'local_temperature');
assert(temperature, 'No temperature found');
const mode = expose.features.find((f) => f.name === 'system_mode');
assert(mode, 'No mode found');
const state = expose.features.find((f) => f.name === 'running_state');
assert(state, 'No state found');
discoveryEntry = {
type: 'climate',
@@ -201,19 +197,25 @@ class HomeAssistant extends Extension {
// Temperature
current_temperature_topic: true,
current_temperature_template: `{{ value_json.${temperature.property} }}`,
// Mode
mode_state_topic: true,
mode_state_template: `{{ value_json.${mode.property} }}`,
modes: mode.values,
mode_command_topic: true,
// State
action_topic: true,
action_template: `{% set values = ` +
`{'idle':'off','heat':'heating','cool':'cooling','fan only':'fan'}` +
` %}{{ values[value_json.${state.property}] }}`,
},
};
const mode = expose.features.find((f) => f.name === 'system_mode');
if (mode) {
discoveryEntry.discovery_payload.mode_state_topic = true;
discoveryEntry.discovery_payload.mode_state_template = `{{ value_json.${mode.property} }}`;
discoveryEntry.discovery_payload.modes = mode.values;
discoveryEntry.discovery_payload.mode_command_topic = true;
}
const state = expose.features.find((f) => f.name === 'running_state');
if (state) {
discoveryEntry.discovery_payload.action_topic = true;
discoveryEntry.discovery_payload.action_template = `{% set values = ` +
`{'idle':'off','heat':'heating','cool':'cooling','fan only':'fan'}` +
` %}{{ values[value_json.${state.property}] }}`;
}
const coolingSetpoint = expose.features.find((f) => f.name === 'occupied_cooling_setpoint');
if (coolingSetpoint) {
discoveryEntry.discovery_payload.temperature_low_command_topic = setpoint.name;
+3 -3
View File
@@ -14539,9 +14539,9 @@
}
},
"zigbee-herdsman-converters": {
"version": "13.0.3",
"resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-13.0.3.tgz",
"integrity": "sha512-jRiMsrJdmKYAFAs/zVrZJmwVLnFkLlF+VtSVuKCSUriQp6epCifVVDVchobjmngkpOUP3EsCv9E80kVDzrLj7Q==",
"version": "13.0.4",
"resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-13.0.4.tgz",
"integrity": "sha512-I1oqbQdFbp8HQdBdb3zIzsDdZFc4/LzoJ5StOvvPPiUFfA8q5ZkFsqhTBTBISCQRcrRnFfzOuUpLUG8MILEGVg==",
"requires": {
"axios": "^0.21.0",
"buffer-crc32": "^0.2.13",
+1 -1
View File
@@ -52,7 +52,7 @@
"winston-syslog": "^2.4.4",
"ws": "^7.3.1",
"zigbee-herdsman": "0.13.35",
"zigbee-herdsman-converters": "13.0.3",
"zigbee-herdsman-converters": "13.0.4",
"zigbee2mqtt-frontend": "0.2.91"
},
"devDependencies": {