mirror of
https://github.com/Andre0512/pyhOn.git
synced 2025-05-24 11:47:03 -04:00
Fix typeerror hon#77
This commit is contained in:
parent
310d1bafd7
commit
55966dd52f
5 changed files with 5 additions and 5 deletions
|
@ -4,7 +4,7 @@ from pyhon.appliances.base import ApplianceBase
|
|||
class Appliance(ApplianceBase):
|
||||
def attributes(self, data):
|
||||
data = super().attributes(data)
|
||||
if data["lastConnEvent"]["category"] == "DISCONNECTED":
|
||||
if data.get("lastConnEvent", {}).get("category", "") == "DISCONNECTED":
|
||||
data["parameters"]["temp"] = "0"
|
||||
data["parameters"]["onOffStatus"] = "0"
|
||||
data["parameters"]["remoteCtrValid"] = "0"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue