Fix Home Assistant Template variable warning: 'dict object' has no attribute 'latest_version' when rendering '{{ value_json['update']['latest_version'] }}' error. https://github.com/Koenkk/zigbee2mqtt/issues/15747

This commit is contained in:
Koen Kanters
2023-01-02 09:18:36 +01:00
parent 4e40c8223f
commit cdb984f830
+1 -1
View File
@@ -1478,7 +1478,7 @@ export default class HomeAssistant extends Extension {
}
}
if (entity.isDevice() && entity.definition?.ota && !message.update?.hasOwnProperty('installed_version')) {
if (entity.isDevice() && entity.definition?.ota && !message.update?.hasOwnProperty('latest_version')) {
message.update = {...message.update, installed_version: -1, latest_version: -1};
}
}