Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
9f130e2e85 | |||
dfbc24452b |
@ -276,7 +276,7 @@ class HonAppliance:
|
||||
extra = {n: c.data for n, c in self._commands.items() if c.data}
|
||||
if extra:
|
||||
data |= {"extra_command_data": extra}
|
||||
for sensible in ["PK", "SK", "serialNumber", "code", "coords", "device"]:
|
||||
for sensible in ["PK", "SK", "serialNumber", "coords", "device"]:
|
||||
data.get("appliance", {}).pop(sensible, None)
|
||||
result = helper.pretty_print({"data": data}, whitespace=whitespace)
|
||||
result += helper.pretty_print(
|
||||
|
@ -72,7 +72,6 @@ class HonAPI:
|
||||
async def load_commands(self, appliance: HonAppliance) -> Dict:
|
||||
params: Dict = {
|
||||
"applianceType": appliance.appliance_type,
|
||||
"code": appliance.info["code"],
|
||||
"applianceModelId": appliance.appliance_model_id,
|
||||
"macAddress": appliance.mac_address,
|
||||
"os": const.OS,
|
||||
|
@ -83,7 +83,7 @@ class Hon:
|
||||
)
|
||||
except (KeyError, ValueError, IndexError) as error:
|
||||
_LOGGER.exception(error)
|
||||
_LOGGER.error(f"Device data - %s", appliance_data)
|
||||
_LOGGER.error("Device data - %s", appliance_data)
|
||||
self._appliances.append(appliance)
|
||||
|
||||
async def setup(self) -> None:
|
||||
|
@ -9,7 +9,7 @@ class HonParameterEnum(HonParameter):
|
||||
self._default = attributes.get("defaultValue")
|
||||
self._value = self._default or "0"
|
||||
self._values: List[str] = attributes.get("enumValues", [])
|
||||
if self._default and self._default not in self._values:
|
||||
if self._default and str(self._default) not in self.values:
|
||||
self._values.append(self._default)
|
||||
|
||||
def __repr__(self) -> str:
|
||||
|
Reference in New Issue
Block a user