Bump plugwise to v0.32.2 (#99973)

* Bump plugwise to v0.32.2

* Adapt number.py to the backend updates

* Update related test-cases

* Update plugwise test-fixtures

* Update test_diagnostics.py
This commit is contained in:
Bouwe Westerdijk 2023-09-09 23:50:26 +02:00 committed by Paulus Schoutsen
parent e6c2833032
commit 7cdb4ec852
16 changed files with 493 additions and 291 deletions

View File

@ -7,6 +7,6 @@
"integration_type": "hub", "integration_type": "hub",
"iot_class": "local_polling", "iot_class": "local_polling",
"loggers": ["crcmod", "plugwise"], "loggers": ["crcmod", "plugwise"],
"requirements": ["plugwise==0.31.9"], "requirements": ["plugwise==0.32.2"],
"zeroconf": ["_plugwise._tcp.local."] "zeroconf": ["_plugwise._tcp.local."]
} }

View File

@ -27,7 +27,7 @@ from .entity import PlugwiseEntity
class PlugwiseEntityDescriptionMixin: class PlugwiseEntityDescriptionMixin:
"""Mixin values for Plugwise entities.""" """Mixin values for Plugwise entities."""
command: Callable[[Smile, str, float], Awaitable[None]] command: Callable[[Smile, str, str, float], Awaitable[None]]
@dataclass @dataclass
@ -43,7 +43,9 @@ NUMBER_TYPES = (
PlugwiseNumberEntityDescription( PlugwiseNumberEntityDescription(
key="maximum_boiler_temperature", key="maximum_boiler_temperature",
translation_key="maximum_boiler_temperature", translation_key="maximum_boiler_temperature",
command=lambda api, number, value: api.set_number_setpoint(number, value), command=lambda api, number, dev_id, value: api.set_number_setpoint(
number, dev_id, value
),
device_class=NumberDeviceClass.TEMPERATURE, device_class=NumberDeviceClass.TEMPERATURE,
entity_category=EntityCategory.CONFIG, entity_category=EntityCategory.CONFIG,
native_unit_of_measurement=UnitOfTemperature.CELSIUS, native_unit_of_measurement=UnitOfTemperature.CELSIUS,
@ -51,7 +53,9 @@ NUMBER_TYPES = (
PlugwiseNumberEntityDescription( PlugwiseNumberEntityDescription(
key="max_dhw_temperature", key="max_dhw_temperature",
translation_key="max_dhw_temperature", translation_key="max_dhw_temperature",
command=lambda api, number, value: api.set_number_setpoint(number, value), command=lambda api, number, dev_id, value: api.set_number_setpoint(
number, dev_id, value
),
device_class=NumberDeviceClass.TEMPERATURE, device_class=NumberDeviceClass.TEMPERATURE,
entity_category=EntityCategory.CONFIG, entity_category=EntityCategory.CONFIG,
native_unit_of_measurement=UnitOfTemperature.CELSIUS, native_unit_of_measurement=UnitOfTemperature.CELSIUS,
@ -94,6 +98,7 @@ class PlugwiseNumberEntity(PlugwiseEntity, NumberEntity):
) -> None: ) -> None:
"""Initiate Plugwise Number.""" """Initiate Plugwise Number."""
super().__init__(coordinator, device_id) super().__init__(coordinator, device_id)
self.device_id = device_id
self.entity_description = description self.entity_description = description
self._attr_unique_id = f"{device_id}-{description.key}" self._attr_unique_id = f"{device_id}-{description.key}"
self._attr_mode = NumberMode.BOX self._attr_mode = NumberMode.BOX
@ -109,6 +114,6 @@ class PlugwiseNumberEntity(PlugwiseEntity, NumberEntity):
async def async_set_native_value(self, value: float) -> None: async def async_set_native_value(self, value: float) -> None:
"""Change to the new setpoint value.""" """Change to the new setpoint value."""
await self.entity_description.command( await self.entity_description.command(
self.coordinator.api, self.entity_description.key, value self.coordinator.api, self.entity_description.key, self.device_id, value
) )
await self.coordinator.async_request_refresh() await self.coordinator.async_request_refresh()

View File

@ -1438,7 +1438,7 @@ plexauth==0.0.6
plexwebsocket==0.0.13 plexwebsocket==0.0.13
# homeassistant.components.plugwise # homeassistant.components.plugwise
plugwise==0.31.9 plugwise==0.32.2
# homeassistant.components.plum_lightpad # homeassistant.components.plum_lightpad
plumlightpad==0.0.11 plumlightpad==0.0.11

View File

@ -1086,7 +1086,7 @@ plexauth==0.0.6
plexwebsocket==0.0.13 plexwebsocket==0.0.13
# homeassistant.components.plugwise # homeassistant.components.plugwise
plugwise==0.31.9 plugwise==0.32.2
# homeassistant.components.plum_lightpad # homeassistant.components.plum_lightpad
plumlightpad==0.0.11 plumlightpad==0.0.11

View File

@ -20,6 +20,12 @@
"setpoint": 13.0, "setpoint": 13.0,
"temperature": 24.2 "temperature": 24.2
}, },
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.0,
"upper_bound": 2.0
},
"thermostat": { "thermostat": {
"lower_bound": 0.0, "lower_bound": 0.0,
"resolution": 0.01, "resolution": 0.01,
@ -43,6 +49,12 @@
"temperature_difference": 2.0, "temperature_difference": 2.0,
"valve_position": 0.0 "valve_position": 0.0
}, },
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.1,
"upper_bound": 2.0
},
"vendor": "Plugwise", "vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A07" "zigbee_mac_address": "ABCD012345670A07"
}, },
@ -60,6 +72,12 @@
"temperature_difference": 1.7, "temperature_difference": 1.7,
"valve_position": 0.0 "valve_position": 0.0
}, },
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.1,
"upper_bound": 2.0
},
"vendor": "Plugwise", "vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A05" "zigbee_mac_address": "ABCD012345670A05"
}, },
@ -99,6 +117,12 @@
"setpoint": 13.0, "setpoint": 13.0,
"temperature": 30.0 "temperature": 30.0
}, },
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.0,
"upper_bound": 2.0
},
"thermostat": { "thermostat": {
"lower_bound": 0.0, "lower_bound": 0.0,
"resolution": 0.01, "resolution": 0.01,
@ -122,6 +146,12 @@
"temperature_difference": 1.8, "temperature_difference": 1.8,
"valve_position": 100 "valve_position": 100
}, },
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.1,
"upper_bound": 2.0
},
"vendor": "Plugwise", "vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A09" "zigbee_mac_address": "ABCD012345670A09"
}, },
@ -145,6 +175,12 @@
"setpoint": 13.0, "setpoint": 13.0,
"temperature": 30.0 "temperature": 30.0
}, },
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.0,
"upper_bound": 2.0
},
"thermostat": { "thermostat": {
"lower_bound": 0.0, "lower_bound": 0.0,
"resolution": 0.01, "resolution": 0.01,
@ -187,6 +223,12 @@
"temperature_difference": 1.9, "temperature_difference": 1.9,
"valve_position": 0.0 "valve_position": 0.0
}, },
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.1,
"upper_bound": 2.0
},
"vendor": "Plugwise", "vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A04" "zigbee_mac_address": "ABCD012345670A04"
}, },
@ -246,6 +288,12 @@
"setpoint": 9.0, "setpoint": 9.0,
"temperature": 27.4 "temperature": 27.4
}, },
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.0,
"upper_bound": 2.0
},
"thermostat": { "thermostat": {
"lower_bound": 4.0, "lower_bound": 4.0,
"resolution": 0.01, "resolution": 0.01,

View File

@ -95,6 +95,12 @@
"temperature_difference": -0.4, "temperature_difference": -0.4,
"valve_position": 0.0 "valve_position": 0.0
}, },
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.0,
"upper_bound": 2.0
},
"vendor": "Plugwise", "vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A17" "zigbee_mac_address": "ABCD012345670A17"
}, },
@ -123,6 +129,12 @@
"setpoint": 15.0, "setpoint": 15.0,
"temperature": 17.2 "temperature": 17.2
}, },
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.0,
"upper_bound": 2.0
},
"thermostat": { "thermostat": {
"lower_bound": 0.0, "lower_bound": 0.0,
"resolution": 0.01, "resolution": 0.01,
@ -200,6 +212,12 @@
"temperature_difference": -0.2, "temperature_difference": -0.2,
"valve_position": 0.0 "valve_position": 0.0
}, },
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.0,
"upper_bound": 2.0
},
"vendor": "Plugwise", "vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A09" "zigbee_mac_address": "ABCD012345670A09"
}, },
@ -217,6 +235,12 @@
"temperature_difference": 3.5, "temperature_difference": 3.5,
"valve_position": 100 "valve_position": 100
}, },
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.0,
"upper_bound": 2.0
},
"vendor": "Plugwise", "vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A02" "zigbee_mac_address": "ABCD012345670A02"
}, },
@ -245,6 +269,12 @@
"setpoint": 21.5, "setpoint": 21.5,
"temperature": 20.9 "temperature": 20.9
}, },
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.0,
"upper_bound": 2.0
},
"thermostat": { "thermostat": {
"lower_bound": 0.0, "lower_bound": 0.0,
"resolution": 0.01, "resolution": 0.01,
@ -289,6 +319,12 @@
"temperature_difference": 0.1, "temperature_difference": 0.1,
"valve_position": 0.0 "valve_position": 0.0
}, },
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.0,
"upper_bound": 2.0
},
"vendor": "Plugwise", "vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A10" "zigbee_mac_address": "ABCD012345670A10"
}, },
@ -317,6 +353,12 @@
"setpoint": 13.0, "setpoint": 13.0,
"temperature": 16.5 "temperature": 16.5
}, },
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.0,
"upper_bound": 2.0
},
"thermostat": { "thermostat": {
"lower_bound": 0.0, "lower_bound": 0.0,
"resolution": 0.01, "resolution": 0.01,
@ -353,6 +395,12 @@
"temperature_difference": 0.0, "temperature_difference": 0.0,
"valve_position": 0.0 "valve_position": 0.0
}, },
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.0,
"upper_bound": 2.0
},
"thermostat": { "thermostat": {
"lower_bound": 0.0, "lower_bound": 0.0,
"resolution": 0.01, "resolution": 0.01,
@ -387,6 +435,12 @@
"setpoint": 14.0, "setpoint": 14.0,
"temperature": 18.9 "temperature": 18.9
}, },
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.0,
"upper_bound": 2.0
},
"thermostat": { "thermostat": {
"lower_bound": 0.0, "lower_bound": 0.0,
"resolution": 0.01, "resolution": 0.01,

View File

@ -76,6 +76,12 @@
"setpoint": 20.5, "setpoint": 20.5,
"temperature": 19.3 "temperature": 19.3
}, },
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": -0.5,
"upper_bound": 2.0
},
"thermostat": { "thermostat": {
"lower_bound": 4.0, "lower_bound": 4.0,
"resolution": 0.1, "resolution": 0.1,

View File

@ -40,6 +40,12 @@
"temperature_difference": 2.3, "temperature_difference": 2.3,
"valve_position": 0.0 "valve_position": 0.0
}, },
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.1,
"upper_bound": 2.0
},
"vendor": "Plugwise", "vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A01" "zigbee_mac_address": "ABCD012345670A01"
}, },
@ -118,6 +124,12 @@
"setpoint_low": 20.0, "setpoint_low": 20.0,
"temperature": 239 "temperature": 239
}, },
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.0,
"upper_bound": 2.0
},
"thermostat": { "thermostat": {
"lower_bound": 0.0, "lower_bound": 0.0,
"resolution": 0.01, "resolution": 0.01,

View File

@ -45,6 +45,12 @@
"temperature_difference": 2.3, "temperature_difference": 2.3,
"valve_position": 0.0 "valve_position": 0.0
}, },
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.1,
"upper_bound": 2.0
},
"vendor": "Plugwise", "vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A01" "zigbee_mac_address": "ABCD012345670A01"
}, },
@ -114,6 +120,12 @@
"setpoint": 15.0, "setpoint": 15.0,
"temperature": 17.9 "temperature": 17.9
}, },
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.0,
"upper_bound": 2.0
},
"thermostat": { "thermostat": {
"lower_bound": 0.0, "lower_bound": 0.0,
"resolution": 0.01, "resolution": 0.01,

View File

@ -78,6 +78,12 @@
"setpoint_low": 20.5, "setpoint_low": 20.5,
"temperature": 26.3 "temperature": 26.3
}, },
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": -0.5,
"upper_bound": 2.0
},
"thermostat": { "thermostat": {
"lower_bound": 4.0, "lower_bound": 4.0,
"resolution": 0.1, "resolution": 0.1,

View File

@ -78,6 +78,12 @@
"setpoint_low": 20.5, "setpoint_low": 20.5,
"temperature": 23.0 "temperature": 23.0
}, },
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": -0.5,
"upper_bound": 2.0
},
"thermostat": { "thermostat": {
"lower_bound": 4.0, "lower_bound": 4.0,
"resolution": 0.1, "resolution": 0.1,

View File

@ -2,7 +2,7 @@
"devices": { "devices": {
"03e65b16e4b247a29ae0d75a78cb492e": { "03e65b16e4b247a29ae0d75a78cb492e": {
"binary_sensors": { "binary_sensors": {
"plugwise_notification": false "plugwise_notification": true
}, },
"dev_class": "gateway", "dev_class": "gateway",
"firmware": "4.4.2", "firmware": "4.4.2",
@ -51,7 +51,11 @@
}, },
"gateway": { "gateway": {
"gateway_id": "03e65b16e4b247a29ae0d75a78cb492e", "gateway_id": "03e65b16e4b247a29ae0d75a78cb492e",
"notifications": {}, "notifications": {
"97a04c0c263049b29350a660b4cdd01e": {
"warning": "The Smile P1 is not connected to a smart meter."
}
},
"smile_name": "Smile P1" "smile_name": "Smile P1"
} }
} }

View File

@ -1 +1,5 @@
{} {
"97a04c0c263049b29350a660b4cdd01e": {
"warning": "The Smile P1 is not connected to a smart meter."
}
}

View File

@ -48,15 +48,6 @@
"vendor": "Plugwise", "vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A07" "zigbee_mac_address": "ABCD012345670A07"
}, },
"71e1944f2a944b26ad73323e399efef0": {
"dev_class": "switching",
"members": ["5ca521ac179d468e91d772eeeb8a2117"],
"model": "Switchgroup",
"name": "Test",
"switches": {
"relay": true
}
},
"aac7b735042c4832ac9ff33aae4f453b": { "aac7b735042c4832ac9ff33aae4f453b": {
"dev_class": "dishwasher", "dev_class": "dishwasher",
"firmware": "2011-06-27T10:52:18+02:00", "firmware": "2011-06-27T10:52:18+02:00",

View File

@ -31,159 +31,141 @@ async def test_diagnostics(
}, },
}, },
"devices": { "devices": {
"df4a4a8169904cdb9c03d61a21f42140": { "02cf28bfec924855854c544690a609ef": {
"dev_class": "zone_thermostat",
"firmware": "2016-10-27T02:00:00+02:00",
"hardware": "255",
"location": "12493538af164a409c6a1c79e38afe1c",
"model": "Lisa",
"name": "Zone Lisa Bios",
"zigbee_mac_address": "ABCD012345670A06",
"vendor": "Plugwise",
"thermostat": {
"setpoint": 13.0,
"lower_bound": 0.0,
"upper_bound": 99.9,
"resolution": 0.01,
},
"available": True,
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
"active_preset": "away",
"available_schedules": [
"CV Roan",
"Bios Schema met Film Avond",
"GF7 Woonkamer",
"Badkamer Schema",
"CV Jessie",
],
"select_schedule": "None",
"last_used": "Badkamer Schema",
"mode": "heat",
"sensors": {"temperature": 16.5, "setpoint": 13.0, "battery": 67},
},
"b310b72a0e354bfab43089919b9a88bf": {
"dev_class": "thermo_sensor",
"firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1",
"location": "c50f167537524366a5af7aa3942feb1e",
"model": "Tom/Floor",
"name": "Floor kraan",
"zigbee_mac_address": "ABCD012345670A02",
"vendor": "Plugwise",
"available": True, "available": True,
"dev_class": "vcr",
"firmware": "2019-06-21T02:00:00+02:00",
"location": "cd143c07248f491493cea0533bc3d669",
"model": "Plug",
"name": "NVR",
"sensors": { "sensors": {
"temperature": 26.0, "electricity_consumed": 34.0,
"setpoint": 21.5, "electricity_consumed_interval": 9.15,
"temperature_difference": 3.5, "electricity_produced": 0.0,
"valve_position": 100, "electricity_produced_interval": 0.0,
}, },
}, "switches": {"lock": True, "relay": True},
"a2c3583e0a6349358998b760cea82d2a": {
"dev_class": "thermo_sensor",
"firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1",
"location": "12493538af164a409c6a1c79e38afe1c",
"model": "Tom/Floor",
"name": "Bios Cv Thermostatic Radiator ",
"zigbee_mac_address": "ABCD012345670A09",
"vendor": "Plugwise", "vendor": "Plugwise",
"available": True, "zigbee_mac_address": "ABCD012345670A15",
"sensors": {
"temperature": 17.2,
"setpoint": 13.0,
"battery": 62,
"temperature_difference": -0.2,
"valve_position": 0.0,
},
},
"b59bcebaf94b499ea7d46e4a66fb62d8": {
"dev_class": "zone_thermostat",
"firmware": "2016-08-02T02:00:00+02:00",
"hardware": "255",
"location": "c50f167537524366a5af7aa3942feb1e",
"model": "Lisa",
"name": "Zone Lisa WK",
"zigbee_mac_address": "ABCD012345670A07",
"vendor": "Plugwise",
"thermostat": {
"setpoint": 21.5,
"lower_bound": 0.0,
"upper_bound": 99.9,
"resolution": 0.01,
},
"available": True,
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
"active_preset": "home",
"available_schedules": [
"CV Roan",
"Bios Schema met Film Avond",
"GF7 Woonkamer",
"Badkamer Schema",
"CV Jessie",
],
"select_schedule": "GF7 Woonkamer",
"last_used": "GF7 Woonkamer",
"mode": "auto",
"sensors": {"temperature": 20.9, "setpoint": 21.5, "battery": 34},
},
"fe799307f1624099878210aa0b9f1475": {
"dev_class": "gateway",
"firmware": "3.0.15",
"hardware": "AME Smile 2.0 board",
"location": "1f9dcf83fd4e4b66b72ff787957bfe5d",
"mac_address": "012345670001",
"model": "Gateway",
"name": "Adam",
"zigbee_mac_address": "ABCD012345670101",
"vendor": "Plugwise",
"select_regulation_mode": "heating",
"binary_sensors": {"plugwise_notification": True},
"sensors": {"outdoor_temperature": 7.81},
},
"d3da73bde12a47d5a6b8f9dad971f2ec": {
"dev_class": "thermo_sensor",
"firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1",
"location": "82fa13f017d240daa0d0ea1775420f24",
"model": "Tom/Floor",
"name": "Thermostatic Radiator Jessie",
"zigbee_mac_address": "ABCD012345670A10",
"vendor": "Plugwise",
"available": True,
"sensors": {
"temperature": 17.1,
"setpoint": 15.0,
"battery": 62,
"temperature_difference": 0.1,
"valve_position": 0.0,
},
}, },
"21f2b542c49845e6bb416884c55778d6": { "21f2b542c49845e6bb416884c55778d6": {
"available": True,
"dev_class": "game_console", "dev_class": "game_console",
"firmware": "2019-06-21T02:00:00+02:00", "firmware": "2019-06-21T02:00:00+02:00",
"location": "cd143c07248f491493cea0533bc3d669", "location": "cd143c07248f491493cea0533bc3d669",
"model": "Plug", "model": "Plug",
"name": "Playstation Smart Plug", "name": "Playstation Smart Plug",
"zigbee_mac_address": "ABCD012345670A12",
"vendor": "Plugwise",
"available": True,
"sensors": { "sensors": {
"electricity_consumed": 82.6, "electricity_consumed": 82.6,
"electricity_consumed_interval": 8.6, "electricity_consumed_interval": 8.6,
"electricity_produced": 0.0, "electricity_produced": 0.0,
"electricity_produced_interval": 0.0, "electricity_produced_interval": 0.0,
}, },
"switches": {"relay": True, "lock": False}, "switches": {"lock": False, "relay": True},
"vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A12",
},
"4a810418d5394b3f82727340b91ba740": {
"available": True,
"dev_class": "router",
"firmware": "2019-06-21T02:00:00+02:00",
"location": "cd143c07248f491493cea0533bc3d669",
"model": "Plug",
"name": "USG Smart Plug",
"sensors": {
"electricity_consumed": 8.5,
"electricity_consumed_interval": 0.0,
"electricity_produced": 0.0,
"electricity_produced_interval": 0.0,
},
"switches": {"lock": True, "relay": True},
"vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A16",
},
"675416a629f343c495449970e2ca37b5": {
"available": True,
"dev_class": "router",
"firmware": "2019-06-21T02:00:00+02:00",
"location": "cd143c07248f491493cea0533bc3d669",
"model": "Plug",
"name": "Ziggo Modem",
"sensors": {
"electricity_consumed": 12.2,
"electricity_consumed_interval": 2.97,
"electricity_produced": 0.0,
"electricity_produced_interval": 0.0,
},
"switches": {"lock": True, "relay": True},
"vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A01",
},
"680423ff840043738f42cc7f1ff97a36": {
"available": True,
"dev_class": "thermo_sensor",
"firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1",
"location": "08963fec7c53423ca5680aa4cb502c63",
"model": "Tom/Floor",
"name": "Thermostatic Radiator Badkamer",
"sensors": {
"battery": 51,
"setpoint": 14.0,
"temperature": 19.1,
"temperature_difference": -0.4,
"valve_position": 0.0,
},
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.0,
"upper_bound": 2.0,
},
"vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A17",
},
"6a3bf693d05e48e0b460c815a4fdd09d": {
"active_preset": "asleep",
"available": True,
"available_schedules": [
"CV Roan",
"Bios Schema met Film Avond",
"GF7 Woonkamer",
"Badkamer Schema",
"CV Jessie",
],
"dev_class": "zone_thermostat",
"firmware": "2016-10-27T02:00:00+02:00",
"hardware": "255",
"last_used": "CV Jessie",
"location": "82fa13f017d240daa0d0ea1775420f24",
"mode": "auto",
"model": "Lisa",
"name": "Zone Thermostat Jessie",
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
"select_schedule": "CV Jessie",
"sensors": {"battery": 37, "setpoint": 15.0, "temperature": 17.2},
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.0,
"upper_bound": 2.0,
},
"thermostat": {
"lower_bound": 0.0,
"resolution": 0.01,
"setpoint": 15.0,
"upper_bound": 99.9,
},
"vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A03",
}, },
"78d1126fc4c743db81b61c20e88342a7": { "78d1126fc4c743db81b61c20e88342a7": {
"available": True,
"dev_class": "central_heating_pump", "dev_class": "central_heating_pump",
"firmware": "2019-06-21T02:00:00+02:00", "firmware": "2019-06-21T02:00:00+02:00",
"location": "c50f167537524366a5af7aa3942feb1e", "location": "c50f167537524366a5af7aa3942feb1e",
"model": "Plug", "model": "Plug",
"name": "CV Pomp", "name": "CV Pomp",
"zigbee_mac_address": "ABCD012345670A05",
"vendor": "Plugwise",
"available": True,
"sensors": { "sensors": {
"electricity_consumed": 35.6, "electricity_consumed": 35.6,
"electricity_consumed_interval": 7.37, "electricity_consumed_interval": 7.37,
@ -191,153 +173,88 @@ async def test_diagnostics(
"electricity_produced_interval": 0.0, "electricity_produced_interval": 0.0,
}, },
"switches": {"relay": True}, "switches": {"relay": True},
"vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A05",
}, },
"90986d591dcd426cae3ec3e8111ff730": { "90986d591dcd426cae3ec3e8111ff730": {
"binary_sensors": {"heating_state": True},
"dev_class": "heater_central", "dev_class": "heater_central",
"location": "1f9dcf83fd4e4b66b72ff787957bfe5d", "location": "1f9dcf83fd4e4b66b72ff787957bfe5d",
"model": "Unknown", "model": "Unknown",
"name": "OnOff", "name": "OnOff",
"binary_sensors": {"heating_state": True},
"sensors": { "sensors": {
"water_temperature": 70.0,
"intended_boiler_temperature": 70.0, "intended_boiler_temperature": 70.0,
"modulation_level": 1, "modulation_level": 1,
"water_temperature": 70.0,
}, },
}, },
"cd0ddb54ef694e11ac18ed1cbce5dbbd": {
"dev_class": "vcr",
"firmware": "2019-06-21T02:00:00+02:00",
"location": "cd143c07248f491493cea0533bc3d669",
"model": "Plug",
"name": "NAS",
"zigbee_mac_address": "ABCD012345670A14",
"vendor": "Plugwise",
"available": True,
"sensors": {
"electricity_consumed": 16.5,
"electricity_consumed_interval": 0.5,
"electricity_produced": 0.0,
"electricity_produced_interval": 0.0,
},
"switches": {"relay": True, "lock": True},
},
"4a810418d5394b3f82727340b91ba740": {
"dev_class": "router",
"firmware": "2019-06-21T02:00:00+02:00",
"location": "cd143c07248f491493cea0533bc3d669",
"model": "Plug",
"name": "USG Smart Plug",
"zigbee_mac_address": "ABCD012345670A16",
"vendor": "Plugwise",
"available": True,
"sensors": {
"electricity_consumed": 8.5,
"electricity_consumed_interval": 0.0,
"electricity_produced": 0.0,
"electricity_produced_interval": 0.0,
},
"switches": {"relay": True, "lock": True},
},
"02cf28bfec924855854c544690a609ef": {
"dev_class": "vcr",
"firmware": "2019-06-21T02:00:00+02:00",
"location": "cd143c07248f491493cea0533bc3d669",
"model": "Plug",
"name": "NVR",
"zigbee_mac_address": "ABCD012345670A15",
"vendor": "Plugwise",
"available": True,
"sensors": {
"electricity_consumed": 34.0,
"electricity_consumed_interval": 9.15,
"electricity_produced": 0.0,
"electricity_produced_interval": 0.0,
},
"switches": {"relay": True, "lock": True},
},
"a28f588dc4a049a483fd03a30361ad3a": { "a28f588dc4a049a483fd03a30361ad3a": {
"available": True,
"dev_class": "settop", "dev_class": "settop",
"firmware": "2019-06-21T02:00:00+02:00", "firmware": "2019-06-21T02:00:00+02:00",
"location": "cd143c07248f491493cea0533bc3d669", "location": "cd143c07248f491493cea0533bc3d669",
"model": "Plug", "model": "Plug",
"name": "Fibaro HC2", "name": "Fibaro HC2",
"zigbee_mac_address": "ABCD012345670A13",
"vendor": "Plugwise",
"available": True,
"sensors": { "sensors": {
"electricity_consumed": 12.5, "electricity_consumed": 12.5,
"electricity_consumed_interval": 3.8, "electricity_consumed_interval": 3.8,
"electricity_produced": 0.0, "electricity_produced": 0.0,
"electricity_produced_interval": 0.0, "electricity_produced_interval": 0.0,
}, },
"switches": {"relay": True, "lock": True}, "switches": {"lock": True, "relay": True},
},
"6a3bf693d05e48e0b460c815a4fdd09d": {
"dev_class": "zone_thermostat",
"firmware": "2016-10-27T02:00:00+02:00",
"hardware": "255",
"location": "82fa13f017d240daa0d0ea1775420f24",
"model": "Lisa",
"name": "Zone Thermostat Jessie",
"zigbee_mac_address": "ABCD012345670A03",
"vendor": "Plugwise", "vendor": "Plugwise",
"thermostat": { "zigbee_mac_address": "ABCD012345670A13",
"setpoint": 15.0,
"lower_bound": 0.0,
"upper_bound": 99.9,
"resolution": 0.01,
},
"available": True,
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
"active_preset": "asleep",
"available_schedules": [
"CV Roan",
"Bios Schema met Film Avond",
"GF7 Woonkamer",
"Badkamer Schema",
"CV Jessie",
],
"select_schedule": "CV Jessie",
"last_used": "CV Jessie",
"mode": "auto",
"sensors": {"temperature": 17.2, "setpoint": 15.0, "battery": 37},
}, },
"680423ff840043738f42cc7f1ff97a36": { "a2c3583e0a6349358998b760cea82d2a": {
"available": True,
"dev_class": "thermo_sensor", "dev_class": "thermo_sensor",
"firmware": "2019-03-27T01:00:00+01:00", "firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1", "hardware": "1",
"location": "08963fec7c53423ca5680aa4cb502c63", "location": "12493538af164a409c6a1c79e38afe1c",
"model": "Tom/Floor", "model": "Tom/Floor",
"name": "Thermostatic Radiator Badkamer", "name": "Bios Cv Thermostatic Radiator ",
"zigbee_mac_address": "ABCD012345670A17",
"vendor": "Plugwise",
"available": True,
"sensors": { "sensors": {
"temperature": 19.1, "battery": 62,
"setpoint": 14.0, "setpoint": 13.0,
"battery": 51, "temperature": 17.2,
"temperature_difference": -0.4, "temperature_difference": -0.2,
"valve_position": 0.0, "valve_position": 0.0,
}, },
}, "temperature_offset": {
"f1fee6043d3642a9b0a65297455f008e": { "lower_bound": -2.0,
"dev_class": "zone_thermostat", "resolution": 0.1,
"firmware": "2016-10-27T02:00:00+02:00", "setpoint": 0.0,
"hardware": "255", "upper_bound": 2.0,
"location": "08963fec7c53423ca5680aa4cb502c63",
"model": "Lisa",
"name": "Zone Thermostat Badkamer",
"zigbee_mac_address": "ABCD012345670A08",
"vendor": "Plugwise",
"thermostat": {
"setpoint": 14.0,
"lower_bound": 0.0,
"upper_bound": 99.9,
"resolution": 0.01,
}, },
"vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A09",
},
"b310b72a0e354bfab43089919b9a88bf": {
"available": True,
"dev_class": "thermo_sensor",
"firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1",
"location": "c50f167537524366a5af7aa3942feb1e",
"model": "Tom/Floor",
"name": "Floor kraan",
"sensors": {
"setpoint": 21.5,
"temperature": 26.0,
"temperature_difference": 3.5,
"valve_position": 100,
},
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.0,
"upper_bound": 2.0,
},
"vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A02",
},
"b59bcebaf94b499ea7d46e4a66fb62d8": {
"active_preset": "home",
"available": True, "available": True,
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
"active_preset": "away",
"available_schedules": [ "available_schedules": [
"CV Roan", "CV Roan",
"Bios Schema met Film Avond", "Bios Schema met Film Avond",
@ -345,46 +262,76 @@ async def test_diagnostics(
"Badkamer Schema", "Badkamer Schema",
"CV Jessie", "CV Jessie",
], ],
"select_schedule": "Badkamer Schema", "dev_class": "zone_thermostat",
"last_used": "Badkamer Schema", "firmware": "2016-08-02T02:00:00+02:00",
"hardware": "255",
"last_used": "GF7 Woonkamer",
"location": "c50f167537524366a5af7aa3942feb1e",
"mode": "auto", "mode": "auto",
"sensors": {"temperature": 18.9, "setpoint": 14.0, "battery": 92}, "model": "Lisa",
"name": "Zone Lisa WK",
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
"select_schedule": "GF7 Woonkamer",
"sensors": {"battery": 34, "setpoint": 21.5, "temperature": 20.9},
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.0,
"upper_bound": 2.0,
},
"thermostat": {
"lower_bound": 0.0,
"resolution": 0.01,
"setpoint": 21.5,
"upper_bound": 99.9,
},
"vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A07",
}, },
"675416a629f343c495449970e2ca37b5": { "cd0ddb54ef694e11ac18ed1cbce5dbbd": {
"dev_class": "router", "available": True,
"dev_class": "vcr",
"firmware": "2019-06-21T02:00:00+02:00", "firmware": "2019-06-21T02:00:00+02:00",
"location": "cd143c07248f491493cea0533bc3d669", "location": "cd143c07248f491493cea0533bc3d669",
"model": "Plug", "model": "Plug",
"name": "Ziggo Modem", "name": "NAS",
"zigbee_mac_address": "ABCD012345670A01",
"vendor": "Plugwise",
"available": True,
"sensors": { "sensors": {
"electricity_consumed": 12.2, "electricity_consumed": 16.5,
"electricity_consumed_interval": 2.97, "electricity_consumed_interval": 0.5,
"electricity_produced": 0.0, "electricity_produced": 0.0,
"electricity_produced_interval": 0.0, "electricity_produced_interval": 0.0,
}, },
"switches": {"relay": True, "lock": True}, "switches": {"lock": True, "relay": True},
"vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A14",
}, },
"e7693eb9582644e5b865dba8d4447cf1": { "d3da73bde12a47d5a6b8f9dad971f2ec": {
"dev_class": "thermostatic_radiator_valve", "available": True,
"dev_class": "thermo_sensor",
"firmware": "2019-03-27T01:00:00+01:00", "firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1", "hardware": "1",
"location": "446ac08dd04d4eff8ac57489757b7314", "location": "82fa13f017d240daa0d0ea1775420f24",
"model": "Tom/Floor", "model": "Tom/Floor",
"name": "CV Kraan Garage", "name": "Thermostatic Radiator Jessie",
"zigbee_mac_address": "ABCD012345670A11", "sensors": {
"vendor": "Plugwise", "battery": 62,
"thermostat": { "setpoint": 15.0,
"setpoint": 5.5, "temperature": 17.1,
"lower_bound": 0.0, "temperature_difference": 0.1,
"upper_bound": 100.0, "valve_position": 0.0,
"resolution": 0.01,
}, },
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.0,
"upper_bound": 2.0,
},
"vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A10",
},
"df4a4a8169904cdb9c03d61a21f42140": {
"active_preset": "away",
"available": True, "available": True,
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
"active_preset": "no_frost",
"available_schedules": [ "available_schedules": [
"CV Roan", "CV Roan",
"Bios Schema met Film Avond", "Bios Schema met Film Avond",
@ -392,16 +339,123 @@ async def test_diagnostics(
"Badkamer Schema", "Badkamer Schema",
"CV Jessie", "CV Jessie",
], ],
"select_schedule": "None", "dev_class": "zone_thermostat",
"firmware": "2016-10-27T02:00:00+02:00",
"hardware": "255",
"last_used": "Badkamer Schema", "last_used": "Badkamer Schema",
"location": "12493538af164a409c6a1c79e38afe1c",
"mode": "heat", "mode": "heat",
"model": "Lisa",
"name": "Zone Lisa Bios",
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
"select_schedule": "None",
"sensors": {"battery": 67, "setpoint": 13.0, "temperature": 16.5},
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.0,
"upper_bound": 2.0,
},
"thermostat": {
"lower_bound": 0.0,
"resolution": 0.01,
"setpoint": 13.0,
"upper_bound": 99.9,
},
"vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A06",
},
"e7693eb9582644e5b865dba8d4447cf1": {
"active_preset": "no_frost",
"available": True,
"available_schedules": [
"CV Roan",
"Bios Schema met Film Avond",
"GF7 Woonkamer",
"Badkamer Schema",
"CV Jessie",
],
"dev_class": "thermostatic_radiator_valve",
"firmware": "2019-03-27T01:00:00+01:00",
"hardware": "1",
"last_used": "Badkamer Schema",
"location": "446ac08dd04d4eff8ac57489757b7314",
"mode": "heat",
"model": "Tom/Floor",
"name": "CV Kraan Garage",
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
"select_schedule": "None",
"sensors": { "sensors": {
"temperature": 15.6,
"setpoint": 5.5,
"battery": 68, "battery": 68,
"setpoint": 5.5,
"temperature": 15.6,
"temperature_difference": 0.0, "temperature_difference": 0.0,
"valve_position": 0.0, "valve_position": 0.0,
}, },
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.0,
"upper_bound": 2.0,
},
"thermostat": {
"lower_bound": 0.0,
"resolution": 0.01,
"setpoint": 5.5,
"upper_bound": 100.0,
},
"vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A11",
},
"f1fee6043d3642a9b0a65297455f008e": {
"active_preset": "away",
"available": True,
"available_schedules": [
"CV Roan",
"Bios Schema met Film Avond",
"GF7 Woonkamer",
"Badkamer Schema",
"CV Jessie",
],
"dev_class": "zone_thermostat",
"firmware": "2016-10-27T02:00:00+02:00",
"hardware": "255",
"last_used": "Badkamer Schema",
"location": "08963fec7c53423ca5680aa4cb502c63",
"mode": "auto",
"model": "Lisa",
"name": "Zone Thermostat Badkamer",
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
"select_schedule": "Badkamer Schema",
"sensors": {"battery": 92, "setpoint": 14.0, "temperature": 18.9},
"temperature_offset": {
"lower_bound": -2.0,
"resolution": 0.1,
"setpoint": 0.0,
"upper_bound": 2.0,
},
"thermostat": {
"lower_bound": 0.0,
"resolution": 0.01,
"setpoint": 14.0,
"upper_bound": 99.9,
},
"vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670A08",
},
"fe799307f1624099878210aa0b9f1475": {
"binary_sensors": {"plugwise_notification": True},
"dev_class": "gateway",
"firmware": "3.0.15",
"hardware": "AME Smile 2.0 board",
"location": "1f9dcf83fd4e4b66b72ff787957bfe5d",
"mac_address": "012345670001",
"model": "Gateway",
"name": "Adam",
"select_regulation_mode": "heating",
"sensors": {"outdoor_temperature": 7.81},
"vendor": "Plugwise",
"zigbee_mac_address": "ABCD012345670101",
}, },
}, },
} }

View File

@ -38,7 +38,7 @@ async def test_anna_max_boiler_temp_change(
assert mock_smile_anna.set_number_setpoint.call_count == 1 assert mock_smile_anna.set_number_setpoint.call_count == 1
mock_smile_anna.set_number_setpoint.assert_called_with( mock_smile_anna.set_number_setpoint.assert_called_with(
"maximum_boiler_temperature", 65.0 "maximum_boiler_temperature", "1cbf783bb11e4a7c8a6843dee3a86927", 65.0
) )
@ -67,5 +67,5 @@ async def test_adam_dhw_setpoint_change(
assert mock_smile_adam_2.set_number_setpoint.call_count == 1 assert mock_smile_adam_2.set_number_setpoint.call_count == 1
mock_smile_adam_2.set_number_setpoint.assert_called_with( mock_smile_adam_2.set_number_setpoint.assert_called_with(
"max_dhw_temperature", 55.0 "max_dhw_temperature", "056ee145a816487eaa69243c3280f8bf", 55.0
) )