Improve Home Assistant connection reliability
This commit is contained in:
@@ -43,7 +43,10 @@ extension HubitatDevice : Decodable
|
||||
|
||||
name = try values.decode(String.self, forKey: .name)
|
||||
|
||||
let attributes = try values.nestedContainer(keyedBy: Self.AttributesKeys, forKey: .attributes)
|
||||
let attributes = try values.nestedContainer(
|
||||
keyedBy: Self.AttributesKeys.self,
|
||||
forKey: .attributes
|
||||
)
|
||||
state = try attributes.decode(DeviceState.self, forKey: .switch)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user