From 635e61cc72eb13212483c89b8666505dbdce60d0 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Fri, 17 Jan 2025 19:20:53 +0100 Subject: [PATCH 01/66] Break out SmileComm class --- plugwise/__init__.py | 2 +- plugwise/helper.py | 153 --------------------------------------- plugwise/smilecomm.py | 163 ++++++++++++++++++++++++++++++++++++++++++ tests/test_generic.py | 2 +- 4 files changed, 165 insertions(+), 155 deletions(-) create mode 100644 plugwise/smilecomm.py diff --git a/plugwise/__init__.py b/plugwise/__init__.py index c4c14f76e..e311861ae 100644 --- a/plugwise/__init__.py +++ b/plugwise/__init__.py @@ -28,9 +28,9 @@ ResponseError, UnsupportedDeviceError, ) -from plugwise.helper import SmileComm from plugwise.legacy.smile import SmileLegacyAPI from plugwise.smile import SmileAPI +from plugwise.smilecomm import SmileComm import aiohttp from defusedxml import ElementTree as etree diff --git a/plugwise/helper.py b/plugwise/helper.py index a51ae02ea..e42ac73b7 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -5,7 +5,6 @@ from __future__ import annotations -import asyncio import datetime as dt from typing import cast @@ -44,23 +43,13 @@ ThermoLoc, ToggleNameType, ) -from plugwise.exceptions import ( - ConnectionFailedError, - InvalidAuthentication, - InvalidXMLError, - ResponseError, -) from plugwise.util import ( check_model, common_match_cases, - escape_illegal_xml_characters, format_measure, skip_obsolete_measurements, ) -# This way of importing aiohttp is because of patch/mocking in testing (aiohttp timeouts) -from aiohttp import BasicAuth, ClientError, ClientResponse, ClientSession, ClientTimeout - # Time related from dateutil import tz from dateutil.parser import parse @@ -78,148 +67,6 @@ def search_actuator_functionalities(appliance: etree, actuator: str) -> etree | return None -class SmileComm: - """The SmileComm class.""" - - def __init__( - self, - host: str, - password: str, - port: int, - timeout: int, - username: str, - websession: ClientSession | None, - ) -> None: - """Set the constructor for this class.""" - if not websession: - aio_timeout = ClientTimeout(total=timeout) - - async def _create_session() -> ClientSession: - return ClientSession(timeout=aio_timeout) # pragma: no cover - - loop = asyncio.get_event_loop() - if loop.is_running(): - self._websession = ClientSession(timeout=aio_timeout) - else: - self._websession = loop.run_until_complete( - _create_session() - ) # pragma: no cover - else: - self._websession = websession - - # Quickfix IPv6 formatting, not covering - if host.count(":") > 2: # pragma: no cover - host = f"[{host}]" - - self._auth = BasicAuth(username, password=password) - self._endpoint = f"http://{host}:{str(port)}" - - async def _request( - self, - command: str, - retry: int = 3, - method: str = "get", - data: str | None = None, - headers: dict[str, str] | None = None, - ) -> etree: - """Get/put/delete data from a give URL.""" - resp: ClientResponse - url = f"{self._endpoint}{command}" - use_headers = headers - - try: - match method: - case "delete": - resp = await self._websession.delete(url, auth=self._auth) - case "get": - # Work-around for Stretchv2, should not hurt the other smiles - use_headers = {"Accept-Encoding": "gzip"} - resp = await self._websession.get( - url, headers=use_headers, auth=self._auth - ) - case "post": - use_headers = {"Content-type": "text/xml"} - resp = await self._websession.post( - url, - headers=use_headers, - data=data, - auth=self._auth, - ) - case "put": - use_headers = {"Content-type": "text/xml"} - resp = await self._websession.put( - url, - headers=use_headers, - data=data, - auth=self._auth, - ) - except ( - ClientError - ) as exc: # ClientError is an ancestor class of ServerTimeoutError - if retry < 1: - LOGGER.warning( - "Failed sending %s %s to Plugwise Smile, error: %s", - method, - command, - exc, - ) - raise ConnectionFailedError from exc - return await self._request(command, retry - 1) - - if resp.status == 504: - if retry < 1: - LOGGER.warning( - "Failed sending %s %s to Plugwise Smile, error: %s", - method, - command, - "504 Gateway Timeout", - ) - raise ConnectionFailedError - return await self._request(command, retry - 1) - - return await self._request_validate(resp, method) - - async def _request_validate(self, resp: ClientResponse, method: str) -> etree: - """Helper-function for _request(): validate the returned data.""" - match resp.status: - case 200: - # Cornercases for server not responding with 202 - if method in ("post", "put"): - return - case 202: - # Command accepted gives empty body with status 202 - return - case 401: - msg = ( - "Invalid Plugwise login, please retry with the correct credentials." - ) - LOGGER.error("%s", msg) - raise InvalidAuthentication - case 405: - msg = "405 Method not allowed." - LOGGER.error("%s", msg) - raise ConnectionFailedError - - if not (result := await resp.text()) or ( - "" in result and "Not started" not in result - ): - LOGGER.warning("Smile response empty or error in %s", result) - raise ResponseError - - try: - # Encode to ensure utf8 parsing - xml = etree.XML(escape_illegal_xml_characters(result).encode()) - except etree.ParseError as exc: - LOGGER.warning("Smile returns invalid XML for %s", self._endpoint) - raise InvalidXMLError from exc - - return xml - - async def close_connection(self) -> None: - """Close the Plugwise connection.""" - await self._websession.close() - - class SmileHelper(SmileCommon): """The SmileHelper class.""" diff --git a/plugwise/smilecomm.py b/plugwise/smilecomm.py new file mode 100644 index 000000000..d91240f3d --- /dev/null +++ b/plugwise/smilecomm.py @@ -0,0 +1,163 @@ +"""Use of this source code is governed by the MIT license found in the LICENSE file. + +Plugwise Smile communication protocol helpers. +""" + +from __future__ import annotations + +import asyncio + +from plugwise.constants import LOGGER +from plugwise.exceptions import ( + ConnectionFailedError, + InvalidAuthentication, + InvalidXMLError, + ResponseError, +) +from plugwise.util import escape_illegal_xml_characters + +# This way of importing aiohttp is because of patch/mocking in testing (aiohttp timeouts) +from aiohttp import BasicAuth, ClientError, ClientResponse, ClientSession, ClientTimeout +from defusedxml import ElementTree as etree + + +class SmileComm: + """The SmileComm class.""" + + def __init__( + self, + host: str, + password: str, + port: int, + timeout: int, + username: str, + websession: ClientSession | None, + ) -> None: + """Set the constructor for this class.""" + if not websession: + aio_timeout = ClientTimeout(total=timeout) + + async def _create_session() -> ClientSession: + return ClientSession(timeout=aio_timeout) # pragma: no cover + + loop = asyncio.get_event_loop() + if loop.is_running(): + self._websession = ClientSession(timeout=aio_timeout) + else: + self._websession = loop.run_until_complete( + _create_session() + ) # pragma: no cover + else: + self._websession = websession + + # Quickfix IPv6 formatting, not covering + if host.count(":") > 2: # pragma: no cover + host = f"[{host}]" + + self._auth = BasicAuth(username, password=password) + self._endpoint = f"http://{host}:{str(port)}" + + async def _request( + self, + command: str, + retry: int = 3, + method: str = "get", + data: str | None = None, + headers: dict[str, str] | None = None, + ) -> etree: + """Get/put/delete data from a give URL.""" + resp: ClientResponse + url = f"{self._endpoint}{command}" + use_headers = headers + + try: + match method: + case "delete": + resp = await self._websession.delete(url, auth=self._auth) + case "get": + # Work-around for Stretchv2, should not hurt the other smiles + use_headers = {"Accept-Encoding": "gzip"} + resp = await self._websession.get( + url, headers=use_headers, auth=self._auth + ) + case "post": + use_headers = {"Content-type": "text/xml"} + resp = await self._websession.post( + url, + headers=use_headers, + data=data, + auth=self._auth, + ) + case "put": + use_headers = {"Content-type": "text/xml"} + resp = await self._websession.put( + url, + headers=use_headers, + data=data, + auth=self._auth, + ) + except ( + ClientError + ) as exc: # ClientError is an ancestor class of ServerTimeoutError + if retry < 1: + LOGGER.warning( + "Failed sending %s %s to Plugwise Smile, error: %s", + method, + command, + exc, + ) + raise ConnectionFailedError from exc + return await self._request(command, retry - 1) + + if resp.status == 504: + if retry < 1: + LOGGER.warning( + "Failed sending %s %s to Plugwise Smile, error: %s", + method, + command, + "504 Gateway Timeout", + ) + raise ConnectionFailedError + return await self._request(command, retry - 1) + + return await self._request_validate(resp, method) + + async def _request_validate(self, resp: ClientResponse, method: str) -> etree: + """Helper-function for _request(): validate the returned data.""" + match resp.status: + case 200: + # Cornercases for server not responding with 202 + if method in ("post", "put"): + return + case 202: + # Command accepted gives empty body with status 202 + return + case 401: + msg = ( + "Invalid Plugwise login, please retry with the correct credentials." + ) + LOGGER.error("%s", msg) + raise InvalidAuthentication + case 405: + msg = "405 Method not allowed." + LOGGER.error("%s", msg) + raise ConnectionFailedError + + if not (result := await resp.text()) or ( + "" in result and "Not started" not in result + ): + LOGGER.warning("Smile response empty or error in %s", result) + raise ResponseError + + try: + # Encode to ensure utf8 parsing + xml = etree.XML(escape_illegal_xml_characters(result).encode()) + except etree.ParseError as exc: + LOGGER.warning("Smile returns invalid XML for %s", self._endpoint) + raise InvalidXMLError from exc + + return xml + + async def close_connection(self) -> None: + """Close the Plugwise connection.""" + await self._websession.close() diff --git a/tests/test_generic.py b/tests/test_generic.py index e098095f6..a89b7d4db 100644 --- a/tests/test_generic.py +++ b/tests/test_generic.py @@ -48,7 +48,7 @@ async def test_connect_fail_firmware(self): # Test connect for timeout @patch( - "plugwise.helper.ClientSession.get", + "plugwise.smilecomm.ClientSession.get", side_effect=aiohttp.ServerTimeoutError, ) @pytest.mark.asyncio From 90c2dcd45693e581cee2afd423c4460f0d8a936f Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Fri, 17 Jan 2025 19:37:52 +0100 Subject: [PATCH 02/66] Clean up smilecomm-related selfs --- plugwise/__init__.py | 26 ++++++-------------------- plugwise/legacy/smile.py | 8 -------- plugwise/smile.py | 8 -------- 3 files changed, 6 insertions(+), 36 deletions(-) diff --git a/plugwise/__init__.py b/plugwise/__init__.py index e311861ae..19ee29154 100644 --- a/plugwise/__init__.py +++ b/plugwise/__init__.py @@ -51,19 +51,15 @@ def __init__( username: str = DEFAULT_USERNAME, ) -> None: """Set the constructor for this class.""" - self._host = host - self._password = password - self._port = port + self._timeout = DEFAULT_LEGACY_TIMEOUT - self._username = username - self._websession = websession super().__init__( - self._host, - self._password, - self._port, + host, + password, + port, self._timeout, - self._username, - self._websession, + username, + websession, ) self._cooling_present = False @@ -128,10 +124,7 @@ async def connect(self) -> Version | None: self._smile_api = ( SmileAPI( - self._host, - self._password, self._request, - self._websession, self._cooling_present, self._elga, self._is_thermostat, @@ -150,15 +143,10 @@ async def connect(self) -> Version | None: self.smile_name, self.smile_type, self.smile_version, - self._port, - self._username, ) if not self.smile_legacy else SmileLegacyAPI( - self._host, - self._password, self._request, - self._websession, self._is_thermostat, self._loc_data, self._on_off_device, @@ -173,8 +161,6 @@ async def connect(self) -> Version | None: self.smile_name, self.smile_type, self.smile_zigbee_mac_address, - self._port, - self._username, ) ) diff --git a/plugwise/legacy/smile.py b/plugwise/legacy/smile.py index 3f08e2634..a2debf7ff 100644 --- a/plugwise/legacy/smile.py +++ b/plugwise/legacy/smile.py @@ -11,8 +11,6 @@ from plugwise.constants import ( APPLIANCES, - DEFAULT_PORT, - DEFAULT_USERNAME, DOMAIN_OBJECTS, LOCATIONS, LOGGER, @@ -28,7 +26,6 @@ from plugwise.exceptions import ConnectionFailedError, DataMissingError, PlugwiseError from plugwise.legacy.data import SmileLegacyData -import aiohttp from munch import Munch from packaging.version import Version @@ -40,10 +37,7 @@ class SmileLegacyAPI(SmileLegacyData): def __init__( self, - host: str, - password: str, request: Callable[..., Awaitable[Any]], - websession: aiohttp.ClientSession, _is_thermostat: bool, _loc_data: dict[str, ThermoLoc], _on_off_device: bool, @@ -58,8 +52,6 @@ def __init__( smile_name: str, smile_type: str, smile_zigbee_mac_address: str | None, - port: int = DEFAULT_PORT, - username: str = DEFAULT_USERNAME, ) -> None: """Set the constructor for this class.""" self._cooling_present = False diff --git a/plugwise/smile.py b/plugwise/smile.py index cd2ed0dca..b13d8e96b 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -13,8 +13,6 @@ ADAM, ANNA, APPLIANCES, - DEFAULT_PORT, - DEFAULT_USERNAME, DOMAIN_OBJECTS, GATEWAY_REBOOT, LOCATIONS, @@ -31,7 +29,6 @@ from plugwise.data import SmileData from plugwise.exceptions import ConnectionFailedError, DataMissingError, PlugwiseError -import aiohttp from defusedxml import ElementTree as etree # Dict as class @@ -46,10 +43,7 @@ class SmileAPI(SmileData): def __init__( self, - host: str, - password: str, request: Callable[..., Awaitable[Any]], - websession: aiohttp.ClientSession, _cooling_present: bool, _elga: bool, _is_thermostat: bool, @@ -68,8 +62,6 @@ def __init__( smile_name: str, smile_type: str, smile_version: Version | None, - port: int = DEFAULT_PORT, - username: str = DEFAULT_USERNAME, ) -> None: """Set the constructor for this class.""" self._cooling_enabled = False From 8ec44f38829c6211ef7b9d6c2464dd39b8bd5fb8 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 18 Jan 2025 09:28:22 +0100 Subject: [PATCH 03/66] Introduce Smile properties --- plugwise/__init__.py | 17 ++++++++++++++--- plugwise/data.py | 27 ++++++++++++--------------- plugwise/helper.py | 17 +++++++---------- plugwise/legacy/data.py | 18 +++++++----------- plugwise/legacy/helper.py | 2 -- plugwise/legacy/smile.py | 3 ++- plugwise/smile.py | 13 +++++++------ 7 files changed, 49 insertions(+), 48 deletions(-) diff --git a/plugwise/__init__.py b/plugwise/__init__.py index 19ee29154..66450fda7 100644 --- a/plugwise/__init__.py +++ b/plugwise/__init__.py @@ -17,6 +17,7 @@ SMILES, STATUS, SYSTEM, + GatewayData, PlugwiseData, ThermoLoc, ) @@ -73,7 +74,7 @@ def __init__( self._smile_api: SmileAPI | SmileLegacyAPI self._stretch_v2 = False self._target_smile: str = NONE - self.gateway_id: str = NONE + self.gw_data: GatewayData = {} self.smile_fw_version: Version | None = None self.smile_hostname: str = NONE self.smile_hw_version: str | None = None @@ -86,6 +87,16 @@ def __init__( self.smile_version: Version | None = None self.smile_zigbee_mac_address: str | None = None + @property + def gateway_id(self) -> str: + """Return the Smile gateway-id.""" + return self.gw_data["gateway_id"] + + @property + def heater_id(self) -> str: + """Return the Smile heater-id.""" + return self.gw_data["heater_id"] + async def connect(self) -> Version | None: """Connect to the Plugwise Gateway and determine its name, type, version, and other data.""" result = await self._request(DOMAIN_OBJECTS) @@ -133,7 +144,7 @@ async def connect(self) -> Version | None: self._on_off_device, self._opentherm_device, self._schedule_old_states, - self.gateway_id, + self.gw_data, self.smile_fw_version, self.smile_hostname, self.smile_hw_version, @@ -153,6 +164,7 @@ async def connect(self) -> Version | None: self._opentherm_device, self._stretch_v2, self._target_smile, + self.gw_data, self.smile_fw_version, self.smile_hostname, self.smile_hw_version, @@ -306,7 +318,6 @@ async def async_update(self) -> PlugwiseData: data = PlugwiseData(devices={}, gateway={}) try: data = await self._smile_api.async_update() - self.gateway_id = data.gateway["gateway_id"] except (DataMissingError, KeyError) as err: raise PlugwiseError("No Plugwise data received") from err diff --git a/plugwise/data.py b/plugwise/data.py index 18297c90f..a35d7b69f 100644 --- a/plugwise/data.py +++ b/plugwise/data.py @@ -15,6 +15,7 @@ NONE, OFF, ActuatorData, + GatewayData, GwEntityData, ) from plugwise.helper import SmileHelper @@ -26,6 +27,7 @@ class SmileData(SmileHelper): def __init__(self) -> None: """Init.""" + self.gw_data: GatewayData SmileHelper.__init__(self) def _all_entity_data(self) -> None: @@ -38,19 +40,14 @@ def _all_entity_data(self) -> None: self._update_zones() self.gw_entities.update(self._zones) - self.gw_data.update( - { - "gateway_id": self.gateway_id, - "item_count": self._count, - "notifications": self._notifications, - "reboot": True, - "smile_name": self.smile_name, - } - ) + self.gw_data["gateway_id"] = self._gateway_id + self.gw_data["item_count"] = self._count + self.gw_data["notifications"] = self._notifications + self.gw_data["reboot"] = True + self.gw_data["smile_name"] = self.smile_name if self._is_thermostat: - self.gw_data.update( - {"heater_id": self._heater_id, "cooling_present": self._cooling_present} - ) + self.gw_data["heater_id"] = self._heater_id + self.gw_data["cooling_present"] = self._cooling_present def _update_zones(self) -> None: """Helper-function for _all_entity_data() and async_update(). @@ -69,7 +66,7 @@ def _update_gw_entities(self) -> None: mac_list: list[str] = [] for entity_id, entity in self.gw_entities.items(): data = self._get_entity_data(entity_id) - if entity_id == self.gateway_id: + if entity_id == self._gateway_id: mac_list = self._detect_low_batteries() self._add_or_update_notifications(entity_id, entity, data) @@ -123,7 +120,7 @@ def _add_or_update_notifications( ) -> None: """Helper-function adding or updating the Plugwise notifications.""" if ( - entity_id == self.gateway_id + entity_id == self._gateway_id and (self._is_thermostat or self.smile_type == "power") ) or ( "binary_sensors" in entity @@ -305,7 +302,7 @@ def _climate_data( def check_reg_mode(self, mode: str) -> bool: """Helper-function for device_data_climate().""" - gateway = self.gw_entities[self.gateway_id] + gateway = self.gw_entities[self._gateway_id] return ( "regulation_modes" in gateway and gateway["select_regulation_mode"] == mode ) diff --git a/plugwise/helper.py b/plugwise/helper.py index e42ac73b7..6d4442113 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -37,7 +37,6 @@ ActuatorData, ActuatorDataType, ActuatorType, - GatewayData, GwEntityData, SensorType, ThermoLoc, @@ -78,8 +77,8 @@ def __init__(self) -> None: self._domain_objects: etree self._endpoint: str self._elga: bool + self._gateway_id: str self._gw_allowed_modes: list[str] = [] - self._heater_id: str self._home_loc_id: str self._home_location: etree self._is_thermostat: bool @@ -110,8 +109,6 @@ def __init__(self) -> None: self._cooling_active = False self._cooling_enabled = False - self.gateway_id: str - self.gw_data: GatewayData = {} self.gw_entities: dict[str, GwEntityData] = {} self.smile_fw_version: version.Version | None self.smile_hw_version: str | None @@ -203,7 +200,7 @@ def _get_p1_smartmeter_info(self) -> None: LOGGER.error("No module data found for SmartMeter") # pragma: no cover return # pragma: no cover appl.available = None - appl.entity_id = self.gateway_id + appl.entity_id = self._gateway_id appl.firmware = module_data["firmware_version"] appl.hardware = module_data["hardware_version"] appl.location = self._home_loc_id @@ -216,8 +213,8 @@ def _get_p1_smartmeter_info(self) -> None: appl.zigbee_mac = None # Replace the entity_id of the gateway by the smartmeter location_id - self.gw_entities[self._home_loc_id] = self.gw_entities.pop(self.gateway_id) - self.gateway_id = self._home_loc_id + self.gw_entities[self._home_loc_id] = self.gw_entities.pop(self._gateway_id) + self._gateway_id = self._home_loc_id self._create_gw_entities(appl) @@ -290,7 +287,7 @@ def _appliance_info_finder(self, appl: Munch, appliance: etree) -> Munch: def _appl_gateway_info(self, appl: Munch, appliance: etree) -> Munch: """Helper-function for _appliance_info_finder().""" - self.gateway_id = appliance.attrib["id"] + self._gateway_id = appliance.attrib["id"] appl.firmware = str(self.smile_fw_version) appl.hardware = self.smile_hw_version appl.mac = self.smile_mac_address @@ -568,7 +565,7 @@ def _get_actuator_mode( Collect the requested gateway mode. """ - if not (self.smile(ADAM) and entity_id == self.gateway_id): + if not (self.smile(ADAM) and entity_id == self._gateway_id): return None if (search := search_actuator_functionalities(appliance, key)) is not None: @@ -609,7 +606,7 @@ def _get_gateway_mode( def _get_gateway_outdoor_temp(self, entity_id: str, data: GwEntityData) -> None: """Adam & Anna: the Smile outdoor_temperature is present in the Home location.""" - if self._is_thermostat and entity_id == self.gateway_id: + if self._is_thermostat and entity_id == self._gateway_id: locator = "./logs/point_log[type='outdoor_temperature']/period/measurement" if (found := self._home_location.find(locator)) is not None: value = format_measure(found.text, NONE) diff --git a/plugwise/legacy/data.py b/plugwise/legacy/data.py index 12e0087d3..adda23e85 100644 --- a/plugwise/legacy/data.py +++ b/plugwise/legacy/data.py @@ -7,7 +7,7 @@ # Dict as class # Version detection -from plugwise.constants import NONE, OFF, GwEntityData +from plugwise.constants import NONE, OFF, GatewayData, GwEntityData from plugwise.legacy.helper import SmileLegacyHelper from plugwise.util import remove_empty_platform_dicts @@ -17,6 +17,7 @@ class SmileLegacyData(SmileLegacyHelper): def __init__(self) -> None: """Init.""" + self.gw_data: GatewayData SmileLegacyHelper.__init__(self) def _all_entity_data(self) -> None: @@ -25,17 +26,12 @@ def _all_entity_data(self) -> None: Collect data for each entity and add to self.gw_data and self.gw_entities. """ self._update_gw_entities() - self.gw_data.update( - { - "gateway_id": self.gateway_id, - "item_count": self._count, - "smile_name": self.smile_name, - } - ) + self.gw_data["gateway_id"] = self.gateway_id + self.gw_data["item_count"] = self._count + self.gw_data["smile_name"] = self.smile_name if self._is_thermostat: - self.gw_data.update( - {"heater_id": self._heater_id, "cooling_present": False} - ) + self.gw_data["heater_id"] = self._heater_id + self.gw_data["cooling_present"] = False def _update_gw_entities(self) -> None: """Helper-function for _all_entity_data() and async_update(). diff --git a/plugwise/legacy/helper.py b/plugwise/legacy/helper.py index 69c5abe7b..f2eee1a1f 100644 --- a/plugwise/legacy/helper.py +++ b/plugwise/legacy/helper.py @@ -30,7 +30,6 @@ ActuatorDataType, ActuatorType, ApplianceType, - GatewayData, GwEntityData, SensorType, ThermoLoc, @@ -81,7 +80,6 @@ def __init__(self) -> None: self._system: etree self.gateway_id: str - self.gw_data: GatewayData = {} self.gw_entities: dict[str, GwEntityData] = {} self.smile_fw_version: Version | None self.smile_hw_version: str | None diff --git a/plugwise/legacy/smile.py b/plugwise/legacy/smile.py index a2debf7ff..9b24c06bf 100644 --- a/plugwise/legacy/smile.py +++ b/plugwise/legacy/smile.py @@ -44,6 +44,7 @@ def __init__( _opentherm_device: bool, _stretch_v2: bool, _target_smile: str, + gw_data: GatewayData, smile_fw_version: Version | None, smile_hostname: str, smile_hw_version: str | None, @@ -61,6 +62,7 @@ def __init__( self._opentherm_device = _opentherm_device self._stretch_v2 = _stretch_v2 self._target_smile = _target_smile + self.gw_data = gw_data self.request = request self.smile_fw_version = smile_fw_version self.smile_hostname = smile_hostname @@ -109,7 +111,6 @@ async def async_update(self) -> PlugwiseData: LOGGER.info( "Performing daily full-update, reload the Plugwise integration when a single entity becomes unavailable." ) - self.gw_data: GatewayData = {} self.gw_entities: dict[str, GwEntityData] = {} try: await self.full_xml_update() diff --git a/plugwise/smile.py b/plugwise/smile.py index b13d8e96b..a7c1a39c9 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -18,6 +18,7 @@ LOCATIONS, MAX_SETPOINT, MIN_SETPOINT, + NONE, NOTIFICATIONS, OFF, RULES, @@ -52,7 +53,7 @@ def __init__( _on_off_device: bool, _opentherm_device: bool, _schedule_old_states: dict[str, dict[str, str]], - gateway_id: str, + gw_data: GatewayData, smile_fw_version: Version | None, smile_hostname: str | None, smile_hw_version: str | None, @@ -67,14 +68,15 @@ def __init__( self._cooling_enabled = False self._cooling_present = _cooling_present self._elga = _elga - self._heater_id: str + self._gateway_id: str = NONE + self._heater_id: str = NONE self._is_thermostat = _is_thermostat self._last_active = _last_active self._loc_data = _loc_data self._on_off_device = _on_off_device self._opentherm_device = _opentherm_device self._schedule_old_states = _schedule_old_states - self.gateway_id = gateway_id + self.gw_data = gw_data self.request = request self.smile_fw_version = smile_fw_version self.smile_hostname = smile_hostname @@ -119,7 +121,6 @@ async def async_update(self) -> PlugwiseData: Any change in the connected entities will be detected immediately. """ - self.gw_data: GatewayData = {} self.gw_entities: dict[str, GwEntityData] = {} self._zones: dict[str, GwEntityData] = {} try: @@ -137,7 +138,7 @@ async def async_update(self) -> PlugwiseData: "cooling_enabled" ] else: # cover failed data-retrieval for P1 - _ = self.gw_entities[self.gateway_id]["location"] + _ = self.gw_entities[self._gateway_id]["location"] except KeyError as err: raise DataMissingError("No Plugwise actual data received") from err @@ -268,7 +269,7 @@ async def set_gateway_mode(self, mode: str) -> None: vacation_time = time_2 + "T23:00:00.000Z" valid = f"{vacation_time}{end_time}" - uri = f"{APPLIANCES};id={self.gateway_id}/gateway_mode_control" + uri = f"{APPLIANCES};id={self._gateway_id}/gateway_mode_control" data = f"{mode}{valid}" await self.call_request(uri, method="put", data=data) From a6a9e316f7872910f1966d10bd8ebaa03255fdab Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 18 Jan 2025 10:10:38 +0100 Subject: [PATCH 04/66] Rework cooling_present related --- plugwise/__init__.py | 25 ++++++++++++++++++++----- plugwise/common.py | 4 ++-- plugwise/data.py | 8 ++++---- plugwise/helper.py | 14 ++++---------- plugwise/legacy/helper.py | 1 + plugwise/legacy/smile.py | 2 +- plugwise/smile.py | 6 +++--- 7 files changed, 35 insertions(+), 25 deletions(-) diff --git a/plugwise/__init__.py b/plugwise/__init__.py index 66450fda7..850c24a98 100644 --- a/plugwise/__init__.py +++ b/plugwise/__init__.py @@ -63,7 +63,6 @@ def __init__( websession, ) - self._cooling_present = False self._elga = False self._is_thermostat = False self._last_active: dict[str, str | None] = {} @@ -74,6 +73,7 @@ def __init__( self._smile_api: SmileAPI | SmileLegacyAPI self._stretch_v2 = False self._target_smile: str = NONE + self.cooling_present = False self.gw_data: GatewayData = {} self.smile_fw_version: Version | None = None self.smile_hostname: str = NONE @@ -89,14 +89,29 @@ def __init__( @property def gateway_id(self) -> str: - """Return the Smile gateway-id.""" + """Return the gateway-id.""" return self.gw_data["gateway_id"] @property def heater_id(self) -> str: - """Return the Smile heater-id.""" + """Return the heater-id.""" return self.gw_data["heater_id"] + @property + def item_count(self) -> int: + """Return the item-count.""" + return self.gw_data["item_count"] + + @property + def notifications(self) -> dict[str, dict[str, str]]: + """Return the Plugwise notifications.""" + return self.gw_data["notifications"] + + @property + def reboot(self) -> bool: + """Return the reboot capability.""" + return self.gw_data["reboot"] + async def connect(self) -> Version | None: """Connect to the Plugwise Gateway and determine its name, type, version, and other data.""" result = await self._request(DOMAIN_OBJECTS) @@ -136,7 +151,7 @@ async def connect(self) -> Version | None: self._smile_api = ( SmileAPI( self._request, - self._cooling_present, + self.cooling_present, self._elga, self._is_thermostat, self._last_active, @@ -251,7 +266,7 @@ async def _smile_detect(self, result: etree, dsmrmain: etree) -> None: locator_1 = "./gateway/features/cooling" locator_2 = "./gateway/features/elga_support" if result.find(locator_1) is not None: - self._cooling_present = True + self.cooling_present = True if result.find(locator_2) is not None: self._elga = True diff --git a/plugwise/common.py b/plugwise/common.py index d1300b592..191e84bf1 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -37,7 +37,7 @@ def __init__(self) -> None: self._appliances: etree self._count: int self._domain_objects: etree - self._cooling_present: bool + self.cooling_present: bool self._heater_id: str self._on_off_device: bool self._opentherm_device: bool @@ -84,7 +84,7 @@ def _appl_heater_central_info( appl.hardware = module_data["hardware_version"] appl.model_id = module_data["vendor_model"] if not legacy else None appl.model = ( - "Generic heater/cooler" if self._cooling_present else "Generic heater" + "Generic heater/cooler" if self.cooling_present else "Generic heater" ) return appl diff --git a/plugwise/data.py b/plugwise/data.py index a35d7b69f..69e442857 100644 --- a/plugwise/data.py +++ b/plugwise/data.py @@ -47,7 +47,7 @@ def _all_entity_data(self) -> None: self.gw_data["smile_name"] = self.smile_name if self._is_thermostat: self.gw_data["heater_id"] = self._heater_id - self.gw_data["cooling_present"] = self._cooling_present + self.gw_data["cooling_present"] = self.cooling_present def _update_zones(self) -> None: """Helper-function for _all_entity_data() and async_update(). @@ -134,7 +134,7 @@ def _update_for_cooling(self, entity: GwEntityData) -> None: # For Anna and heating + cooling, replace setpoint with setpoint_high/_low if ( self.smile(ANNA) - and self._cooling_present + and self.cooling_present and entity["dev_class"] == "thermostat" ): thermostat = entity["thermostat"] @@ -243,7 +243,7 @@ def _get_adam_data(self, entity: GwEntityData, data: GwEntityData) -> None: if "binary_sensors" in data: if ( "cooling_enabled" not in data["binary_sensors"] - and self._cooling_present + and self.cooling_present ): data["binary_sensors"]["cooling_enabled"] = self._cooling_enabled @@ -287,7 +287,7 @@ def _climate_data( self._count += 1 if sel_schedule in (NONE, OFF): data["climate_mode"] = "heat" - if self._cooling_present: + if self.cooling_present: data["climate_mode"] = ( "cool" if self.check_reg_mode("cooling") else "heat_cool" ) diff --git a/plugwise/helper.py b/plugwise/helper.py index 6d4442113..458d8f611 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -71,7 +71,7 @@ class SmileHelper(SmileCommon): def __init__(self) -> None: """Set the constructor for this class.""" - self._cooling_present: bool + self.cooling_present: bool self._count: int self._dhw_allowed_modes: list[str] = [] self._domain_objects: etree @@ -327,15 +327,9 @@ def _get_appl_actuator_modes( ) is not None and (modes := search.find("allowed_modes")) is not None: for mode in modes: mode_list.append(mode.text) - self._check_cooling_mode(mode.text) return mode_list - def _check_cooling_mode(self, mode: str) -> None: - """Check if cooling mode is present and update state.""" - if mode == "cooling": - self._cooling_present = True - def _get_appliances_with_offset_functionality(self) -> list[str]: """Helper-function collecting all appliance that have offset_functionality.""" therm_list: list[str] = [] @@ -660,14 +654,14 @@ def _update_anna_cooling(self, entity_id: str, data: GwEntityData) -> None: if "elga_status_code" in data: self._update_elga_cooling(data) - elif self._cooling_present and "cooling_state" in data["binary_sensors"]: + elif self.cooling_present and "cooling_state" in data["binary_sensors"]: self._update_loria_cooling(data) def _update_elga_cooling(self, data: GwEntityData) -> None: """# Anna+Elga: base cooling_state on the elga-status-code.""" if data["thermostat_supports_cooling"]: # Techneco Elga has cooling-capability - self._cooling_present = True + self.cooling_present = True data["model"] = "Generic heater/cooler" # Cooling_enabled in xml does NOT show the correct status! # Setting it specifically: @@ -707,7 +701,7 @@ def _cleanup_data(self, data: GwEntityData) -> None: """ # Don't show cooling-related when no cooling present, # but, keep cooling_enabled for Elga - if not self._cooling_present: + if not self.cooling_present: if "cooling_state" in data["binary_sensors"]: data["binary_sensors"].pop("cooling_state") self._count -= 1 diff --git a/plugwise/legacy/helper.py b/plugwise/legacy/helper.py index f2eee1a1f..4f43a6f20 100644 --- a/plugwise/legacy/helper.py +++ b/plugwise/legacy/helper.py @@ -79,6 +79,7 @@ def __init__(self) -> None: self._stretch_v2: bool self._system: etree + self.cooling_present: bool self.gateway_id: str self.gw_entities: dict[str, GwEntityData] = {} self.smile_fw_version: Version | None diff --git a/plugwise/legacy/smile.py b/plugwise/legacy/smile.py index 9b24c06bf..633e76f36 100644 --- a/plugwise/legacy/smile.py +++ b/plugwise/legacy/smile.py @@ -55,13 +55,13 @@ def __init__( smile_zigbee_mac_address: str | None, ) -> None: """Set the constructor for this class.""" - self._cooling_present = False self._is_thermostat = _is_thermostat self._loc_data = _loc_data self._on_off_device = _on_off_device self._opentherm_device = _opentherm_device self._stretch_v2 = _stretch_v2 self._target_smile = _target_smile + self.cooling_present = False self.gw_data = gw_data self.request = request self.smile_fw_version = smile_fw_version diff --git a/plugwise/smile.py b/plugwise/smile.py index a7c1a39c9..37794881a 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -45,7 +45,7 @@ class SmileAPI(SmileData): def __init__( self, request: Callable[..., Awaitable[Any]], - _cooling_present: bool, + cooling_present: bool, _elga: bool, _is_thermostat: bool, _last_active: dict[str, str | None], @@ -66,7 +66,7 @@ def __init__( ) -> None: """Set the constructor for this class.""" self._cooling_enabled = False - self._cooling_present = _cooling_present + self.cooling_present = cooling_present self._elga = _elga self._gateway_id: str = NONE self._heater_id: str = NONE @@ -432,7 +432,7 @@ async def set_temperature(self, loc_id: str, items: dict[str, float]) -> None: if "setpoint" in items: setpoint = items["setpoint"] - if self.smile(ANNA) and self._cooling_present: + if self.smile(ANNA) and self.cooling_present: if "setpoint_high" not in items: raise PlugwiseError( "Plugwise: failed setting temperature: no valid input provided" From 6e6dfa8d54eb784b879bbb1f34a00f4c56d90059 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 18 Jan 2025 13:50:07 +0100 Subject: [PATCH 05/66] Remove self.smile_fw_version, only use smile_version --- plugwise/__init__.py | 15 ++++++--------- plugwise/helper.py | 3 +-- plugwise/legacy/helper.py | 4 ++-- plugwise/legacy/smile.py | 4 ++-- plugwise/smile.py | 2 -- 5 files changed, 11 insertions(+), 17 deletions(-) diff --git a/plugwise/__init__.py b/plugwise/__init__.py index 850c24a98..603858ba6 100644 --- a/plugwise/__init__.py +++ b/plugwise/__init__.py @@ -75,7 +75,6 @@ def __init__( self._target_smile: str = NONE self.cooling_present = False self.gw_data: GatewayData = {} - self.smile_fw_version: Version | None = None self.smile_hostname: str = NONE self.smile_hw_version: str | None = None self.smile_legacy = False @@ -160,7 +159,6 @@ async def connect(self) -> Version | None: self._opentherm_device, self._schedule_old_states, self.gw_data, - self.smile_fw_version, self.smile_hostname, self.smile_hw_version, self.smile_mac_address, @@ -180,13 +178,13 @@ async def connect(self) -> Version | None: self._stretch_v2, self._target_smile, self.gw_data, - self.smile_fw_version, self.smile_hostname, self.smile_hw_version, self.smile_mac_address, self.smile_model, self.smile_name, self.smile_type, + self.smile_version, self.smile_zigbee_mac_address, ) ) @@ -205,7 +203,7 @@ async def _smile_detect(self, result: etree, dsmrmain: etree) -> None: if (gateway := result.find("./gateway")) is not None: if (v_model := gateway.find("vendor_model")) is not None: model = v_model.text - self.smile_fw_version = parse(gateway.find("firmware_version").text) + self.smile_version = parse(gateway.find("firmware_version").text) self.smile_hw_version = gateway.find("hardware_version").text self.smile_hostname = gateway.find("hostname").text self.smile_mac_address = gateway.find("mac_address").text @@ -213,7 +211,7 @@ async def _smile_detect(self, result: etree, dsmrmain: etree) -> None: else: model = await self._smile_detect_legacy(result, dsmrmain, model) - if model == "Unknown" or self.smile_fw_version is None: # pragma: no cover + if model == "Unknown" or self.smile_version is None: # pragma: no cover # Corner case check LOGGER.error( "Unable to find model or version information, please create" @@ -221,7 +219,7 @@ async def _smile_detect(self, result: etree, dsmrmain: etree) -> None: ) raise UnsupportedDeviceError - version_major = str(self.smile_fw_version.major) + version_major = str(self.smile_version.major) self._target_smile = f"{model}_v{version_major}" LOGGER.debug("Plugwise identified as %s", self._target_smile) if self._target_smile not in SMILES: @@ -245,7 +243,6 @@ async def _smile_detect(self, result: etree, dsmrmain: etree) -> None: self.smile_model = "Gateway" self.smile_name = SMILES[self._target_smile].smile_name self.smile_type = SMILES[self._target_smile].smile_type - self.smile_version = self.smile_fw_version if self.smile_type == "stretch": self._stretch_v2 = int(version_major) == 2 @@ -294,7 +291,7 @@ async def _smile_detect_legacy( or network is not None ): system = await self._request(SYSTEM) - self.smile_fw_version = parse(system.find("./gateway/firmware").text) + self.smile_version = parse(system.find("./gateway/firmware").text) return_model = system.find("./gateway/product").text self.smile_hostname = system.find("./gateway/hostname").text # If wlan0 contains data it's active, so eth0 should be checked last @@ -305,7 +302,7 @@ async def _smile_detect_legacy( # P1 legacy: elif dsmrmain is not None: status = await self._request(STATUS) - self.smile_fw_version = parse(status.find("./system/version").text) + self.smile_version = parse(status.find("./system/version").text) return_model = status.find("./system/product").text self.smile_hostname = status.find("./network/hostname").text self.smile_mac_address = status.find("./network/mac_address").text diff --git a/plugwise/helper.py b/plugwise/helper.py index 458d8f611..2460f5804 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -110,7 +110,6 @@ def __init__(self) -> None: self._cooling_enabled = False self.gw_entities: dict[str, GwEntityData] = {} - self.smile_fw_version: version.Version | None self.smile_hw_version: str | None self.smile_mac_address: str | None self.smile_model: str @@ -288,7 +287,7 @@ def _appliance_info_finder(self, appl: Munch, appliance: etree) -> Munch: def _appl_gateway_info(self, appl: Munch, appliance: etree) -> Munch: """Helper-function for _appliance_info_finder().""" self._gateway_id = appliance.attrib["id"] - appl.firmware = str(self.smile_fw_version) + appl.firmware = str(self.smile_version) appl.hardware = self.smile_hw_version appl.mac = self.smile_mac_address appl.model = self.smile_model diff --git a/plugwise/legacy/helper.py b/plugwise/legacy/helper.py index 4f43a6f20..f0efbb121 100644 --- a/plugwise/legacy/helper.py +++ b/plugwise/legacy/helper.py @@ -82,12 +82,12 @@ def __init__(self) -> None: self.cooling_present: bool self.gateway_id: str self.gw_entities: dict[str, GwEntityData] = {} - self.smile_fw_version: Version | None self.smile_hw_version: str | None self.smile_mac_address: str | None self.smile_model: str self.smile_name: str self.smile_type: str + self.smile_version: Version | None self.smile_zigbee_mac_address: str | None SmileCommon.__init__(self) @@ -193,7 +193,7 @@ def _create_legacy_gateway(self) -> None: self.gw_entities[self.gateway_id] = {"dev_class": "gateway"} self._count += 1 for key, value in { - "firmware": str(self.smile_fw_version), + "firmware": str(self.smile_version), "location": self._home_loc_id, "mac_address": self.smile_mac_address, "model": self.smile_model, diff --git a/plugwise/legacy/smile.py b/plugwise/legacy/smile.py index 633e76f36..628dea3c6 100644 --- a/plugwise/legacy/smile.py +++ b/plugwise/legacy/smile.py @@ -45,13 +45,13 @@ def __init__( _stretch_v2: bool, _target_smile: str, gw_data: GatewayData, - smile_fw_version: Version | None, smile_hostname: str, smile_hw_version: str | None, smile_mac_address: str | None, smile_model: str, smile_name: str, smile_type: str, + smile_version: Version | None, smile_zigbee_mac_address: str | None, ) -> None: """Set the constructor for this class.""" @@ -64,13 +64,13 @@ def __init__( self.cooling_present = False self.gw_data = gw_data self.request = request - self.smile_fw_version = smile_fw_version self.smile_hostname = smile_hostname self.smile_hw_version = smile_hw_version self.smile_mac_address = smile_mac_address self.smile_model = smile_model self.smile_name = smile_name self.smile_type = smile_type + self.smile_version = smile_version self.smile_zigbee_mac_address = smile_zigbee_mac_address SmileLegacyData.__init__(self) diff --git a/plugwise/smile.py b/plugwise/smile.py index 37794881a..4caef521f 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -54,7 +54,6 @@ def __init__( _opentherm_device: bool, _schedule_old_states: dict[str, dict[str, str]], gw_data: GatewayData, - smile_fw_version: Version | None, smile_hostname: str | None, smile_hw_version: str | None, smile_mac_address: str | None, @@ -78,7 +77,6 @@ def __init__( self._schedule_old_states = _schedule_old_states self.gw_data = gw_data self.request = request - self.smile_fw_version = smile_fw_version self.smile_hostname = smile_hostname self.smile_hw_version = smile_hw_version self.smile_mac_address = smile_mac_address From edcc617fb92fb07b886a748d2ae5b9f0037ba8ab Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 18 Jan 2025 14:01:39 +0100 Subject: [PATCH 06/66] Sorting, use _request --- plugwise/__init__.py | 7 +++---- plugwise/legacy/smile.py | 20 ++++++++++---------- plugwise/smile.py | 12 ++++++------ 3 files changed, 19 insertions(+), 20 deletions(-) diff --git a/plugwise/__init__.py b/plugwise/__init__.py index 603858ba6..59509b8c0 100644 --- a/plugwise/__init__.py +++ b/plugwise/__init__.py @@ -52,7 +52,6 @@ def __init__( username: str = DEFAULT_USERNAME, ) -> None: """Set the constructor for this class.""" - self._timeout = DEFAULT_LEGACY_TIMEOUT super().__init__( host, @@ -149,15 +148,15 @@ async def connect(self) -> Version | None: self._smile_api = ( SmileAPI( - self._request, - self.cooling_present, self._elga, self._is_thermostat, self._last_active, self._loc_data, self._on_off_device, self._opentherm_device, + self._request, self._schedule_old_states, + self.cooling_present, self.gw_data, self.smile_hostname, self.smile_hw_version, @@ -170,11 +169,11 @@ async def connect(self) -> Version | None: ) if not self.smile_legacy else SmileLegacyAPI( - self._request, self._is_thermostat, self._loc_data, self._on_off_device, self._opentherm_device, + self._request, self._stretch_v2, self._target_smile, self.gw_data, diff --git a/plugwise/legacy/smile.py b/plugwise/legacy/smile.py index 628dea3c6..ce1cdeac9 100644 --- a/plugwise/legacy/smile.py +++ b/plugwise/legacy/smile.py @@ -37,11 +37,11 @@ class SmileLegacyAPI(SmileLegacyData): def __init__( self, - request: Callable[..., Awaitable[Any]], _is_thermostat: bool, _loc_data: dict[str, ThermoLoc], _on_off_device: bool, _opentherm_device: bool, + _request: Callable[..., Awaitable[Any]], _stretch_v2: bool, _target_smile: str, gw_data: GatewayData, @@ -59,11 +59,11 @@ def __init__( self._loc_data = _loc_data self._on_off_device = _on_off_device self._opentherm_device = _opentherm_device + self._request = _request self._stretch_v2 = _stretch_v2 self._target_smile = _target_smile self.cooling_present = False self.gw_data = gw_data - self.request = request self.smile_hostname = smile_hostname self.smile_hw_version = smile_hw_version self.smile_mac_address = smile_mac_address @@ -78,12 +78,12 @@ def __init__( async def full_xml_update(self) -> None: """Perform a first fetch of the Plugwise server XML data.""" - self._domain_objects = await self.request(DOMAIN_OBJECTS) - self._locations = await self.request(LOCATIONS) - self._modules = await self.request(MODULES) + self._domain_objects = await self._request(DOMAIN_OBJECTS) + self._locations = await self._request(LOCATIONS) + self._modules = await self._request(MODULES) # P1 legacy has no appliances if self.smile_type != "power": - self._appliances = await self.request(APPLIANCES) + self._appliances = await self._request(APPLIANCES) def get_all_gateway_entities(self) -> None: """Collect the Plugwise gateway entities and their data and states from the received raw XML-data. @@ -123,12 +123,12 @@ async def async_update(self) -> PlugwiseData: ) from err else: try: - self._domain_objects = await self.request(DOMAIN_OBJECTS) + self._domain_objects = await self._request(DOMAIN_OBJECTS) match self._target_smile: case "smile_v2": - self._modules = await self.request(MODULES) + self._modules = await self._request(MODULES) case self._target_smile if self._target_smile in REQUIRE_APPLIANCES: - self._appliances = await self.request(APPLIANCES) + self._appliances = await self._request(APPLIANCES) self._update_gw_entities() # Detect failed data-retrieval @@ -300,6 +300,6 @@ async def call_request(self, uri: str, **kwargs: Any) -> None: method: str = kwargs["method"] data: str | None = kwargs.get("data") try: - await self.request(uri, method=method, data=data) + await self._request(uri, method=method, data=data) except ConnectionFailedError as exc: raise ConnectionFailedError from exc diff --git a/plugwise/smile.py b/plugwise/smile.py index 4caef521f..52c545b8b 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -44,15 +44,15 @@ class SmileAPI(SmileData): def __init__( self, - request: Callable[..., Awaitable[Any]], - cooling_present: bool, _elga: bool, _is_thermostat: bool, _last_active: dict[str, str | None], _loc_data: dict[str, ThermoLoc], _on_off_device: bool, _opentherm_device: bool, + _request: Callable[..., Awaitable[Any]], _schedule_old_states: dict[str, dict[str, str]], + cooling_present: bool, gw_data: GatewayData, smile_hostname: str | None, smile_hw_version: str | None, @@ -65,7 +65,6 @@ def __init__( ) -> None: """Set the constructor for this class.""" self._cooling_enabled = False - self.cooling_present = cooling_present self._elga = _elga self._gateway_id: str = NONE self._heater_id: str = NONE @@ -74,9 +73,10 @@ def __init__( self._loc_data = _loc_data self._on_off_device = _on_off_device self._opentherm_device = _opentherm_device + self._request = _request self._schedule_old_states = _schedule_old_states + self.cooling_present = cooling_present self.gw_data = gw_data - self.request = request self.smile_hostname = smile_hostname self.smile_hw_version = smile_hw_version self.smile_mac_address = smile_mac_address @@ -90,7 +90,7 @@ def __init__( async def full_xml_update(self) -> None: """Perform a first fetch of the Plugwise server XML data.""" - self._domain_objects = await self.request(DOMAIN_OBJECTS) + self._domain_objects = await self._request(DOMAIN_OBJECTS) self._get_plugwise_notifications() def get_all_gateway_entities(self) -> None: @@ -469,6 +469,6 @@ async def call_request(self, uri: str, **kwargs: Any) -> None: method: str = kwargs["method"] data: str | None = kwargs.get("data") try: - await self.request(uri, method=method, data=data) + await self._request(uri, method=method, data=data) except ConnectionFailedError as exc: raise ConnectionFailedError from exc From 8597d0333474f93e307dcf9dfc1073b5818b1dd7 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 18 Jan 2025 14:11:29 +0100 Subject: [PATCH 07/66] Rename gw_data to _smile_props --- plugwise/__init__.py | 18 +++++++++--------- plugwise/constants.py | 6 +++--- plugwise/data.py | 20 ++++++++++---------- plugwise/legacy/data.py | 16 ++++++++-------- plugwise/legacy/smile.py | 8 ++++---- plugwise/smile.py | 12 ++++++------ 6 files changed, 40 insertions(+), 40 deletions(-) diff --git a/plugwise/__init__.py b/plugwise/__init__.py index 59509b8c0..f456bd5ae 100644 --- a/plugwise/__init__.py +++ b/plugwise/__init__.py @@ -17,8 +17,8 @@ SMILES, STATUS, SYSTEM, - GatewayData, PlugwiseData, + SmileProps, ThermoLoc, ) from plugwise.exceptions import ( @@ -70,10 +70,10 @@ def __init__( self._opentherm_device = False self._schedule_old_states: dict[str, dict[str, str]] = {} self._smile_api: SmileAPI | SmileLegacyAPI + self._smile_props: SmileProps = {} self._stretch_v2 = False self._target_smile: str = NONE self.cooling_present = False - self.gw_data: GatewayData = {} self.smile_hostname: str = NONE self.smile_hw_version: str | None = None self.smile_legacy = False @@ -88,27 +88,27 @@ def __init__( @property def gateway_id(self) -> str: """Return the gateway-id.""" - return self.gw_data["gateway_id"] + return self._smile_props["gateway_id"] @property def heater_id(self) -> str: """Return the heater-id.""" - return self.gw_data["heater_id"] + return self._smile_props["heater_id"] @property def item_count(self) -> int: """Return the item-count.""" - return self.gw_data["item_count"] + return self._smile_props["item_count"] @property def notifications(self) -> dict[str, dict[str, str]]: """Return the Plugwise notifications.""" - return self.gw_data["notifications"] + return self._smile_props["notifications"] @property def reboot(self) -> bool: """Return the reboot capability.""" - return self.gw_data["reboot"] + return self._smile_props["reboot"] async def connect(self) -> Version | None: """Connect to the Plugwise Gateway and determine its name, type, version, and other data.""" @@ -156,8 +156,8 @@ async def connect(self) -> Version | None: self._opentherm_device, self._request, self._schedule_old_states, + self._smile_props, self.cooling_present, - self.gw_data, self.smile_hostname, self.smile_hw_version, self.smile_mac_address, @@ -174,9 +174,9 @@ async def connect(self) -> Version | None: self._on_off_device, self._opentherm_device, self._request, + self._smile_props, self._stretch_v2, self._target_smile, - self.gw_data, self.smile_hostname, self.smile_hw_version, self.smile_mac_address, diff --git a/plugwise/constants.py b/plugwise/constants.py index 232da091b..011cfcf1c 100644 --- a/plugwise/constants.py +++ b/plugwise/constants.py @@ -394,8 +394,8 @@ ) -class GatewayData(TypedDict, total=False): - """The Gateway Data class.""" +class SmileProps(TypedDict, total=False): + """The SmileProps Data class.""" cooling_present: bool gateway_id: str @@ -584,4 +584,4 @@ class PlugwiseData: """Plugwise data provided as output.""" devices: dict[str, GwEntityData] - gateway: GatewayData + gateway: SmileProps diff --git a/plugwise/data.py b/plugwise/data.py index 69e442857..495a75dae 100644 --- a/plugwise/data.py +++ b/plugwise/data.py @@ -15,8 +15,8 @@ NONE, OFF, ActuatorData, - GatewayData, GwEntityData, + SmileProps, ) from plugwise.helper import SmileHelper from plugwise.util import remove_empty_platform_dicts @@ -27,27 +27,27 @@ class SmileData(SmileHelper): def __init__(self) -> None: """Init.""" - self.gw_data: GatewayData + self._smile_props: SmileProps SmileHelper.__init__(self) def _all_entity_data(self) -> None: """Helper-function for get_all_gateway_entities(). - Collect data for each entity and add to self.gw_data and self.gw_entities. + Collect data for each entity and add to self._smile_props and self.gw_entities. """ self._update_gw_entities() if self.smile(ADAM): self._update_zones() self.gw_entities.update(self._zones) - self.gw_data["gateway_id"] = self._gateway_id - self.gw_data["item_count"] = self._count - self.gw_data["notifications"] = self._notifications - self.gw_data["reboot"] = True - self.gw_data["smile_name"] = self.smile_name + self._smile_props["gateway_id"] = self._gateway_id + self._smile_props["item_count"] = self._count + self._smile_props["notifications"] = self._notifications + self._smile_props["reboot"] = True + self._smile_props["smile_name"] = self.smile_name if self._is_thermostat: - self.gw_data["heater_id"] = self._heater_id - self.gw_data["cooling_present"] = self.cooling_present + self._smile_props["heater_id"] = self._heater_id + self._smile_props["cooling_present"] = self.cooling_present def _update_zones(self) -> None: """Helper-function for _all_entity_data() and async_update(). diff --git a/plugwise/legacy/data.py b/plugwise/legacy/data.py index adda23e85..de53c3bea 100644 --- a/plugwise/legacy/data.py +++ b/plugwise/legacy/data.py @@ -7,7 +7,7 @@ # Dict as class # Version detection -from plugwise.constants import NONE, OFF, GatewayData, GwEntityData +from plugwise.constants import NONE, OFF, GwEntityData, SmileProps from plugwise.legacy.helper import SmileLegacyHelper from plugwise.util import remove_empty_platform_dicts @@ -17,21 +17,21 @@ class SmileLegacyData(SmileLegacyHelper): def __init__(self) -> None: """Init.""" - self.gw_data: GatewayData + self._smile_props: SmileProps SmileLegacyHelper.__init__(self) def _all_entity_data(self) -> None: """Helper-function for get_all_gateway_entities(). - Collect data for each entity and add to self.gw_data and self.gw_entities. + Collect data for each entity and add to self._smile_props and self.gw_entities. """ self._update_gw_entities() - self.gw_data["gateway_id"] = self.gateway_id - self.gw_data["item_count"] = self._count - self.gw_data["smile_name"] = self.smile_name + self._smile_props["gateway_id"] = self.gateway_id + self._smile_props["item_count"] = self._count + self._smile_props["smile_name"] = self.smile_name if self._is_thermostat: - self.gw_data["heater_id"] = self._heater_id - self.gw_data["cooling_present"] = False + self._smile_props["heater_id"] = self._heater_id + self._smile_props["cooling_present"] = False def _update_gw_entities(self) -> None: """Helper-function for _all_entity_data() and async_update(). diff --git a/plugwise/legacy/smile.py b/plugwise/legacy/smile.py index ce1cdeac9..f33155a1d 100644 --- a/plugwise/legacy/smile.py +++ b/plugwise/legacy/smile.py @@ -18,9 +18,9 @@ OFF, REQUIRE_APPLIANCES, RULES, - GatewayData, GwEntityData, PlugwiseData, + SmileProps, ThermoLoc, ) from plugwise.exceptions import ConnectionFailedError, DataMissingError, PlugwiseError @@ -42,9 +42,9 @@ def __init__( _on_off_device: bool, _opentherm_device: bool, _request: Callable[..., Awaitable[Any]], + _smile_props: SmileProps, _stretch_v2: bool, _target_smile: str, - gw_data: GatewayData, smile_hostname: str, smile_hw_version: str | None, smile_mac_address: str | None, @@ -60,10 +60,10 @@ def __init__( self._on_off_device = _on_off_device self._opentherm_device = _opentherm_device self._request = _request + self._smile_props = _smile_props self._stretch_v2 = _stretch_v2 self._target_smile = _target_smile self.cooling_present = False - self.gw_data = gw_data self.smile_hostname = smile_hostname self.smile_hw_version = smile_hw_version self.smile_mac_address = smile_mac_address @@ -139,7 +139,7 @@ async def async_update(self) -> PlugwiseData: self._previous_day_number = day_number return PlugwiseData( devices=self.gw_entities, - gateway=self.gw_data, + gateway=self._smile_props, ) ######################################################################################################## diff --git a/plugwise/smile.py b/plugwise/smile.py index 52c545b8b..6790ed5f2 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -22,9 +22,9 @@ NOTIFICATIONS, OFF, RULES, - GatewayData, GwEntityData, PlugwiseData, + SmileProps, ThermoLoc, ) from plugwise.data import SmileData @@ -52,8 +52,8 @@ def __init__( _opentherm_device: bool, _request: Callable[..., Awaitable[Any]], _schedule_old_states: dict[str, dict[str, str]], + _smile_props: SmileProps, cooling_present: bool, - gw_data: GatewayData, smile_hostname: str | None, smile_hw_version: str | None, smile_mac_address: str | None, @@ -75,8 +75,8 @@ def __init__( self._opentherm_device = _opentherm_device self._request = _request self._schedule_old_states = _schedule_old_states + self._smile_props = _smile_props self.cooling_present = cooling_present - self.gw_data = gw_data self.smile_hostname = smile_hostname self.smile_hw_version = smile_hw_version self.smile_mac_address = smile_mac_address @@ -126,8 +126,8 @@ async def async_update(self) -> PlugwiseData: self.get_all_gateway_entities() # Set self._cooling_enabled - required for set_temperature(), # also, check for a failed data-retrieval - if "heater_id" in self.gw_data: - heat_cooler = self.gw_entities[self.gw_data["heater_id"]] + if "heater_id" in self._smile_props: + heat_cooler = self.gw_entities[self._smile_props["heater_id"]] if ( "binary_sensors" in heat_cooler and "cooling_enabled" in heat_cooler["binary_sensors"] @@ -142,7 +142,7 @@ async def async_update(self) -> PlugwiseData: return PlugwiseData( devices=self.gw_entities, - gateway=self.gw_data, + gateway=self._smile_props, ) ######################################################################################################## From c530e4f047c4a1e51678a437f3cd05e082d63853 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 19 Jan 2025 09:03:30 +0100 Subject: [PATCH 08/66] Adapt testing --- tests/test_init.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tests/test_init.py b/tests/test_init.py index b35a35138..72563ff72 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -617,17 +617,14 @@ def test_and_assert(test_dict, data, header): _LOGGER.info("Asserting updated testdata:") data = await smile.async_update() - self.cooling_present = False - if "cooling_present" in data.gateway: - self.cooling_present = data.gateway["cooling_present"] - if "notifications" in data.gateway: - self.notifications = data.gateway["notifications"] - self.entity_items = data.gateway["item_count"] + self.cooling_present = smile.cooling_present + self.notifications = smile.notifications + self.entity_items = smile.item_count self._cooling_active = False self._cooling_enabled = False - if "heater_id" in data.gateway: - heat_cooler = data.devices[data.gateway["heater_id"]] + if smile.heater_id != "None": + heat_cooler = data.devices[smile.heater_id] if "binary_sensors" in heat_cooler: if "cooling_enabled" in heat_cooler["binary_sensors"]: self._cooling_enabled = heat_cooler["binary_sensors"][ @@ -647,7 +644,7 @@ def test_and_assert(test_dict, data, header): self.entity_list = list(data.devices.keys()) location_list = smile._loc_data - _LOGGER.info("Gateway id = %s", data.gateway["gateway_id"]) + _LOGGER.info("Gateway id = %s", smile.gateway_id) _LOGGER.info("Hostname = %s", smile.smile_hostname) _LOGGER.info("Gateway data = %s", data.gateway) _LOGGER.info("Entities list = %s", data.devices) From c32833f71a83e20ccc352f886d5844065f61a515 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 19 Jan 2025 09:14:41 +0100 Subject: [PATCH 09/66] Add cooling_present as a property --- plugwise/__init__.py | 11 ++++++++--- plugwise/common.py | 4 ++-- plugwise/data.py | 8 ++++---- plugwise/helper.py | 8 ++++---- plugwise/legacy/helper.py | 2 -- plugwise/legacy/smile.py | 2 +- plugwise/smile.py | 6 +++--- 7 files changed, 22 insertions(+), 19 deletions(-) diff --git a/plugwise/__init__.py b/plugwise/__init__.py index f456bd5ae..e028638fb 100644 --- a/plugwise/__init__.py +++ b/plugwise/__init__.py @@ -62,6 +62,7 @@ def __init__( websession, ) + self._cooling_present = False self._elga = False self._is_thermostat = False self._last_active: dict[str, str | None] = {} @@ -73,7 +74,6 @@ def __init__( self._smile_props: SmileProps = {} self._stretch_v2 = False self._target_smile: str = NONE - self.cooling_present = False self.smile_hostname: str = NONE self.smile_hw_version: str | None = None self.smile_legacy = False @@ -85,6 +85,11 @@ def __init__( self.smile_version: Version | None = None self.smile_zigbee_mac_address: str | None = None + @property + def cooling_present(self) -> str: + """Return the cooling capability.""" + return self._smile_props["cooling_present"] + @property def gateway_id(self) -> str: """Return the gateway-id.""" @@ -148,6 +153,7 @@ async def connect(self) -> Version | None: self._smile_api = ( SmileAPI( + self._cooling_present, self._elga, self._is_thermostat, self._last_active, @@ -157,7 +163,6 @@ async def connect(self) -> Version | None: self._request, self._schedule_old_states, self._smile_props, - self.cooling_present, self.smile_hostname, self.smile_hw_version, self.smile_mac_address, @@ -262,7 +267,7 @@ async def _smile_detect(self, result: etree, dsmrmain: etree) -> None: locator_1 = "./gateway/features/cooling" locator_2 = "./gateway/features/elga_support" if result.find(locator_1) is not None: - self.cooling_present = True + self._cooling_present = True if result.find(locator_2) is not None: self._elga = True diff --git a/plugwise/common.py b/plugwise/common.py index 191e84bf1..711afb178 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -35,9 +35,9 @@ class SmileCommon: def __init__(self) -> None: """Init.""" self._appliances: etree + self._cooling_present: bool self._count: int self._domain_objects: etree - self.cooling_present: bool self._heater_id: str self._on_off_device: bool self._opentherm_device: bool @@ -84,7 +84,7 @@ def _appl_heater_central_info( appl.hardware = module_data["hardware_version"] appl.model_id = module_data["vendor_model"] if not legacy else None appl.model = ( - "Generic heater/cooler" if self.cooling_present else "Generic heater" + "Generic heater/cooler" if self._cooling_present else "Generic heater" ) return appl diff --git a/plugwise/data.py b/plugwise/data.py index 495a75dae..869027ef6 100644 --- a/plugwise/data.py +++ b/plugwise/data.py @@ -47,7 +47,7 @@ def _all_entity_data(self) -> None: self._smile_props["smile_name"] = self.smile_name if self._is_thermostat: self._smile_props["heater_id"] = self._heater_id - self._smile_props["cooling_present"] = self.cooling_present + self._smile_props["cooling_present"] = self._cooling_present def _update_zones(self) -> None: """Helper-function for _all_entity_data() and async_update(). @@ -134,7 +134,7 @@ def _update_for_cooling(self, entity: GwEntityData) -> None: # For Anna and heating + cooling, replace setpoint with setpoint_high/_low if ( self.smile(ANNA) - and self.cooling_present + and self._cooling_present and entity["dev_class"] == "thermostat" ): thermostat = entity["thermostat"] @@ -243,7 +243,7 @@ def _get_adam_data(self, entity: GwEntityData, data: GwEntityData) -> None: if "binary_sensors" in data: if ( "cooling_enabled" not in data["binary_sensors"] - and self.cooling_present + and self._cooling_present ): data["binary_sensors"]["cooling_enabled"] = self._cooling_enabled @@ -287,7 +287,7 @@ def _climate_data( self._count += 1 if sel_schedule in (NONE, OFF): data["climate_mode"] = "heat" - if self.cooling_present: + if self._cooling_present: data["climate_mode"] = ( "cool" if self.check_reg_mode("cooling") else "heat_cool" ) diff --git a/plugwise/helper.py b/plugwise/helper.py index 2460f5804..443b0dd4f 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -71,7 +71,7 @@ class SmileHelper(SmileCommon): def __init__(self) -> None: """Set the constructor for this class.""" - self.cooling_present: bool + self._cooling_present: bool self._count: int self._dhw_allowed_modes: list[str] = [] self._domain_objects: etree @@ -653,14 +653,14 @@ def _update_anna_cooling(self, entity_id: str, data: GwEntityData) -> None: if "elga_status_code" in data: self._update_elga_cooling(data) - elif self.cooling_present and "cooling_state" in data["binary_sensors"]: + elif self._cooling_present and "cooling_state" in data["binary_sensors"]: self._update_loria_cooling(data) def _update_elga_cooling(self, data: GwEntityData) -> None: """# Anna+Elga: base cooling_state on the elga-status-code.""" if data["thermostat_supports_cooling"]: # Techneco Elga has cooling-capability - self.cooling_present = True + self._cooling_present = True data["model"] = "Generic heater/cooler" # Cooling_enabled in xml does NOT show the correct status! # Setting it specifically: @@ -700,7 +700,7 @@ def _cleanup_data(self, data: GwEntityData) -> None: """ # Don't show cooling-related when no cooling present, # but, keep cooling_enabled for Elga - if not self.cooling_present: + if not self._cooling_present: if "cooling_state" in data["binary_sensors"]: data["binary_sensors"].pop("cooling_state") self._count -= 1 diff --git a/plugwise/legacy/helper.py b/plugwise/legacy/helper.py index f0efbb121..773fd13a5 100644 --- a/plugwise/legacy/helper.py +++ b/plugwise/legacy/helper.py @@ -78,8 +78,6 @@ def __init__(self) -> None: self._status: etree self._stretch_v2: bool self._system: etree - - self.cooling_present: bool self.gateway_id: str self.gw_entities: dict[str, GwEntityData] = {} self.smile_hw_version: str | None diff --git a/plugwise/legacy/smile.py b/plugwise/legacy/smile.py index f33155a1d..4806966cf 100644 --- a/plugwise/legacy/smile.py +++ b/plugwise/legacy/smile.py @@ -55,6 +55,7 @@ def __init__( smile_zigbee_mac_address: str | None, ) -> None: """Set the constructor for this class.""" + self._cooling_present = False self._is_thermostat = _is_thermostat self._loc_data = _loc_data self._on_off_device = _on_off_device @@ -63,7 +64,6 @@ def __init__( self._smile_props = _smile_props self._stretch_v2 = _stretch_v2 self._target_smile = _target_smile - self.cooling_present = False self.smile_hostname = smile_hostname self.smile_hw_version = smile_hw_version self.smile_mac_address = smile_mac_address diff --git a/plugwise/smile.py b/plugwise/smile.py index 6790ed5f2..7b66d4c3c 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -44,6 +44,7 @@ class SmileAPI(SmileData): def __init__( self, + _cooling_present: bool, _elga: bool, _is_thermostat: bool, _last_active: dict[str, str | None], @@ -53,7 +54,6 @@ def __init__( _request: Callable[..., Awaitable[Any]], _schedule_old_states: dict[str, dict[str, str]], _smile_props: SmileProps, - cooling_present: bool, smile_hostname: str | None, smile_hw_version: str | None, smile_mac_address: str | None, @@ -65,6 +65,7 @@ def __init__( ) -> None: """Set the constructor for this class.""" self._cooling_enabled = False + self._cooling_present = _cooling_present self._elga = _elga self._gateway_id: str = NONE self._heater_id: str = NONE @@ -76,7 +77,6 @@ def __init__( self._request = _request self._schedule_old_states = _schedule_old_states self._smile_props = _smile_props - self.cooling_present = cooling_present self.smile_hostname = smile_hostname self.smile_hw_version = smile_hw_version self.smile_mac_address = smile_mac_address @@ -430,7 +430,7 @@ async def set_temperature(self, loc_id: str, items: dict[str, float]) -> None: if "setpoint" in items: setpoint = items["setpoint"] - if self.smile(ANNA) and self.cooling_present: + if self.smile(ANNA) and self._cooling_present: if "setpoint_high" not in items: raise PlugwiseError( "Plugwise: failed setting temperature: no valid input provided" From 6e3c4b158bf25d6c94c333259f5af7e28b6553ac Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 19 Jan 2025 09:21:15 +0100 Subject: [PATCH 10/66] Fix legacy --- plugwise/legacy/data.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugwise/legacy/data.py b/plugwise/legacy/data.py index de53c3bea..e709a3500 100644 --- a/plugwise/legacy/data.py +++ b/plugwise/legacy/data.py @@ -28,6 +28,8 @@ def _all_entity_data(self) -> None: self._update_gw_entities() self._smile_props["gateway_id"] = self.gateway_id self._smile_props["item_count"] = self._count + self._smile_props["notifications"] = {} + self._smile_props["reboot"] = False self._smile_props["smile_name"] = self.smile_name if self._is_thermostat: self._smile_props["heater_id"] = self._heater_id From 52ff43a4d3dcd6ba925e75b2253ed644025a0a2e Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 19 Jan 2025 09:24:21 +0100 Subject: [PATCH 11/66] Fix non-thermostats --- plugwise/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugwise/__init__.py b/plugwise/__init__.py index e028638fb..193416b6a 100644 --- a/plugwise/__init__.py +++ b/plugwise/__init__.py @@ -86,9 +86,11 @@ def __init__( self.smile_zigbee_mac_address: str | None = None @property - def cooling_present(self) -> str: + def cooling_present(self) -> str | None: """Return the cooling capability.""" - return self._smile_props["cooling_present"] + if "cooling_present" in self._smile_props: + return self._smile_props["cooling_present"] + return None @property def gateway_id(self) -> str: From 66239566e42049bdb66b115ee25889aa4599d2fd Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 19 Jan 2025 09:25:51 +0100 Subject: [PATCH 12/66] Fix heater_id --- plugwise/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugwise/__init__.py b/plugwise/__init__.py index 193416b6a..2abbc4601 100644 --- a/plugwise/__init__.py +++ b/plugwise/__init__.py @@ -100,7 +100,9 @@ def gateway_id(self) -> str: @property def heater_id(self) -> str: """Return the heater-id.""" - return self._smile_props["heater_id"] + if "heater_id" in self._smile_props: + return self._smile_props["heater_id"] + return NONE @property def item_count(self) -> int: From 1a8340742f4459dcd2ecb02acc23fea042d95e5d Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 19 Jan 2025 09:28:07 +0100 Subject: [PATCH 13/66] Revert adding not present properties --- plugwise/legacy/data.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/plugwise/legacy/data.py b/plugwise/legacy/data.py index e709a3500..777f528a1 100644 --- a/plugwise/legacy/data.py +++ b/plugwise/legacy/data.py @@ -28,12 +28,9 @@ def _all_entity_data(self) -> None: self._update_gw_entities() self._smile_props["gateway_id"] = self.gateway_id self._smile_props["item_count"] = self._count - self._smile_props["notifications"] = {} - self._smile_props["reboot"] = False self._smile_props["smile_name"] = self.smile_name if self._is_thermostat: self._smile_props["heater_id"] = self._heater_id - self._smile_props["cooling_present"] = False def _update_gw_entities(self) -> None: """Helper-function for _all_entity_data() and async_update(). From 7673ad91fdbc5cd96448aa08322879a2a33ad1e0 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 19 Jan 2025 09:31:15 +0100 Subject: [PATCH 14/66] Adapt properties accordingly --- plugwise/__init__.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/plugwise/__init__.py b/plugwise/__init__.py index 2abbc4601..755877c8d 100644 --- a/plugwise/__init__.py +++ b/plugwise/__init__.py @@ -112,12 +112,17 @@ def item_count(self) -> int: @property def notifications(self) -> dict[str, dict[str, str]]: """Return the Plugwise notifications.""" - return self._smile_props["notifications"] + if "notifications" in self._smile_props: + return self._smile_props["notifications"] + return {} @property def reboot(self) -> bool: - """Return the reboot capability.""" - return self._smile_props["reboot"] + """Return the reboot capability. + + All non-legacy devices support gateway-rebooting. + """ + return not self.smile_legacy async def connect(self) -> Version | None: """Connect to the Plugwise Gateway and determine its name, type, version, and other data.""" From 0a9e5b95c97fb225581828f98c4b4a3a31ce59b6 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 19 Jan 2025 09:32:29 +0100 Subject: [PATCH 15/66] Fix cooling_present --- plugwise/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugwise/__init__.py b/plugwise/__init__.py index 755877c8d..c4e2ecf83 100644 --- a/plugwise/__init__.py +++ b/plugwise/__init__.py @@ -86,11 +86,11 @@ def __init__( self.smile_zigbee_mac_address: str | None = None @property - def cooling_present(self) -> str | None: + def cooling_present(self) -> bool: """Return the cooling capability.""" if "cooling_present" in self._smile_props: return self._smile_props["cooling_present"] - return None + return False @property def gateway_id(self) -> str: From 7405f6233e8709c6260fc28c8f4cbe9bc0d59a5f Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 19 Jan 2025 10:35:23 +0100 Subject: [PATCH 16/66] Add devices property, replacing the PlugwiseData output --- plugwise/__init__.py | 15 +++++++++------ plugwise/constants.py | 9 --------- plugwise/data.py | 1 + plugwise/helper.py | 4 ++-- plugwise/legacy/smile.py | 8 ++------ plugwise/smile.py | 8 ++------ tests/test_adam.py | 1 + tests/test_init.py | 26 ++++++++++++++------------ tests/test_legacy_anna.py | 1 + 9 files changed, 32 insertions(+), 41 deletions(-) diff --git a/plugwise/__init__.py b/plugwise/__init__.py index c4e2ecf83..a26f82da4 100644 --- a/plugwise/__init__.py +++ b/plugwise/__init__.py @@ -17,7 +17,7 @@ SMILES, STATUS, SYSTEM, - PlugwiseData, + GwEntityData, SmileProps, ThermoLoc, ) @@ -63,6 +63,7 @@ def __init__( ) self._cooling_present = False + self._devices: dict[str, GwEntityData] = {} self._elga = False self._is_thermostat = False self._last_active: dict[str, str | None] = {} @@ -92,6 +93,11 @@ def cooling_present(self) -> bool: return self._smile_props["cooling_present"] return False + @property + def devices(self) -> dict[str, GwEntityData]: + """Return all devices and their data.""" + return self._devices + @property def gateway_id(self) -> str: """Return the gateway-id.""" @@ -338,16 +344,13 @@ def get_all_gateway_entities(self) -> None: """Collect the Plugwise Gateway entities and their data and states from the received raw XML-data.""" self._smile_api.get_all_gateway_entities() - async def async_update(self) -> PlugwiseData: + async def async_update(self) -> None: """Update the Plughwise Gateway entities and their data and states.""" - data = PlugwiseData(devices={}, gateway={}) try: - data = await self._smile_api.async_update() + self._devices = await self._smile_api.async_update() except (DataMissingError, KeyError) as err: raise PlugwiseError("No Plugwise data received") from err - return data - ######################################################################################################## ### API Set and HA Service-related Functions ### ######################################################################################################## diff --git a/plugwise/constants.py b/plugwise/constants.py index 011cfcf1c..d216e4cdc 100644 --- a/plugwise/constants.py +++ b/plugwise/constants.py @@ -3,7 +3,6 @@ from __future__ import annotations from collections import namedtuple -from dataclasses import dataclass import logging from typing import Final, Literal, TypedDict, get_args @@ -577,11 +576,3 @@ class GwEntityData(TypedDict, total=False): switches: SmileSwitches temperature_offset: ActuatorData thermostat: ActuatorData - - -@dataclass -class PlugwiseData: - """Plugwise data provided as output.""" - - devices: dict[str, GwEntityData] - gateway: SmileProps diff --git a/plugwise/data.py b/plugwise/data.py index 869027ef6..cd158b790 100644 --- a/plugwise/data.py +++ b/plugwise/data.py @@ -28,6 +28,7 @@ class SmileData(SmileHelper): def __init__(self) -> None: """Init.""" self._smile_props: SmileProps + self.gw_entities: dict[str, GwEntityData] SmileHelper.__init__(self) def _all_entity_data(self) -> None: diff --git a/plugwise/helper.py b/plugwise/helper.py index 443b0dd4f..96987397d 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -109,7 +109,7 @@ def __init__(self) -> None: self._cooling_active = False self._cooling_enabled = False - self.gw_entities: dict[str, GwEntityData] = {} + self.gw_entities: dict[str, GwEntityData] self.smile_hw_version: str | None self.smile_mac_address: str | None self.smile_model: str @@ -118,7 +118,7 @@ def __init__(self) -> None: self.smile_type: str self.smile_version: version.Version | None self.smile_zigbee_mac_address: str | None - self._zones: dict[str, GwEntityData] = {} + self._zones: dict[str, GwEntityData] SmileCommon.__init__(self) def _all_appliances(self) -> None: diff --git a/plugwise/legacy/smile.py b/plugwise/legacy/smile.py index 4806966cf..530068da5 100644 --- a/plugwise/legacy/smile.py +++ b/plugwise/legacy/smile.py @@ -19,7 +19,6 @@ REQUIRE_APPLIANCES, RULES, GwEntityData, - PlugwiseData, SmileProps, ThermoLoc, ) @@ -98,7 +97,7 @@ def get_all_gateway_entities(self) -> None: self._all_entity_data() - async def async_update(self) -> PlugwiseData: + async def async_update(self) -> dict[str, GwEntityData]: """Perform an full update update at day-change: re-collect all gateway entities and their data and states. Otherwise perform an incremental update: only collect the entities updated data and states. @@ -137,10 +136,7 @@ async def async_update(self) -> PlugwiseData: raise DataMissingError("No legacy Plugwise data received") from err self._previous_day_number = day_number - return PlugwiseData( - devices=self.gw_entities, - gateway=self._smile_props, - ) + return self.gw_entities ######################################################################################################## ### API Set and HA Service-related Functions ### diff --git a/plugwise/smile.py b/plugwise/smile.py index 7b66d4c3c..b425f0fac 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -23,7 +23,6 @@ OFF, RULES, GwEntityData, - PlugwiseData, SmileProps, ThermoLoc, ) @@ -114,7 +113,7 @@ def get_all_gateway_entities(self) -> None: self._all_entity_data() - async def async_update(self) -> PlugwiseData: + async def async_update(self) -> dict[str, GwEntityData]: """Perform an full update: re-collect all gateway entities and their data and states. Any change in the connected entities will be detected immediately. @@ -140,10 +139,7 @@ async def async_update(self) -> PlugwiseData: except KeyError as err: raise DataMissingError("No Plugwise actual data received") from err - return PlugwiseData( - devices=self.gw_entities, - gateway=self._smile_props, - ) + return self.gw_entities ######################################################################################################## ### API Set and HA Service-related Functions ### diff --git a/tests/test_adam.py b/tests/test_adam.py index bc521104f..ab37a6d8b 100644 --- a/tests/test_adam.py +++ b/tests/test_adam.py @@ -52,6 +52,7 @@ async def test_connect_adam_plus_anna_new(self): "f2bf9048bef64cc5b6d5110154e33c81", "f871b8c4d63549319221e294e4f88074", ] + assert smile.reboot result = await self.tinker_thermostat( smile, diff --git a/tests/test_init.py b/tests/test_init.py index 72563ff72..a15aef075 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -608,14 +608,19 @@ def test_and_assert(test_dict, data, header): if smile.smile_legacy: await smile.full_xml_update() smile.get_all_gateway_entities() - data = await smile.async_update() + await smile.async_update() assert smile._timeout == 30 else: - data = await smile.async_update() + await smile.async_update() assert smile._timeout == 10 else: _LOGGER.info("Asserting updated testdata:") - data = await smile.async_update() + await smile.async_update() + + _LOGGER.info("Gateway id = %s", smile.gateway_id) + _LOGGER.info("Heater id = %s", smile.heater_id) + _LOGGER.info("Hostname = %s", smile.smile_hostname) + _LOGGER.info("Entities list = %s", smile.devices) self.cooling_present = smile.cooling_present self.notifications = smile.notifications @@ -624,7 +629,7 @@ def test_and_assert(test_dict, data, header): self._cooling_active = False self._cooling_enabled = False if smile.heater_id != "None": - heat_cooler = data.devices[smile.heater_id] + heat_cooler = smile.devices[smile.heater_id] if "binary_sensors" in heat_cooler: if "cooling_enabled" in heat_cooler["binary_sensors"]: self._cooling_enabled = heat_cooler["binary_sensors"][ @@ -635,27 +640,24 @@ def test_and_assert(test_dict, data, header): "cooling_state" ] - self._write_json("all_data", {"devices": data.devices, "gateway": data.gateway}) + self._write_json("all_data", {"devices": smile.devices}) if "FIXTURES" in os.environ: _LOGGER.info("Skipping tests: Requested fixtures only") # pragma: no cover return # pragma: no cover - self.entity_list = list(data.devices.keys()) + self.entity_list = list(smile.devices.keys()) location_list = smile._loc_data - _LOGGER.info("Gateway id = %s", smile.gateway_id) - _LOGGER.info("Hostname = %s", smile.smile_hostname) - _LOGGER.info("Gateway data = %s", data.gateway) - _LOGGER.info("Entities list = %s", data.devices) - self.show_setup(location_list, data.devices) + + self.show_setup(location_list, smile.devices) if skip_testing: return # Perform tests and asserts in two steps: devices and zones for header, data_dict in testdata.items(): - test_and_assert(data_dict, data.devices, header) + test_and_assert(data_dict, smile.devices, header) # pragma warning restore S3776 diff --git a/tests/test_legacy_anna.py b/tests/test_legacy_anna.py index 6f05eccd5..a3a7b8469 100644 --- a/tests/test_legacy_anna.py +++ b/tests/test_legacy_anna.py @@ -31,6 +31,7 @@ async def test_connect_legacy_anna(self): await self.device_test(smile, "2020-03-22 00:00:01", testdata) assert smile.gateway_id == "0000aaaa0000aaaa0000aaaa0000aa00" assert self.entity_items == 41 + assert not smile.reboot result = await self.tinker_legacy_thermostat(smile, schedule_on=False) assert result From 7459b2fd38d14d610e3ae45645187f4bcb73205c Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 19 Jan 2025 10:39:35 +0100 Subject: [PATCH 17/66] Clean up self-vars --- plugwise/common.py | 3 --- plugwise/helper.py | 47 +++++++++------------------------------ plugwise/legacy/helper.py | 15 ------------- plugwise/smile.py | 4 ---- 4 files changed, 10 insertions(+), 59 deletions(-) diff --git a/plugwise/common.py b/plugwise/common.py index 711afb178..b4049b699 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -34,13 +34,10 @@ class SmileCommon: def __init__(self) -> None: """Init.""" - self._appliances: etree self._cooling_present: bool self._count: int self._domain_objects: etree - self._heater_id: str self._on_off_device: bool - self._opentherm_device: bool self.gw_entities: dict[str, GwEntityData] self.smile_name: str self.smile_type: str diff --git a/plugwise/helper.py b/plugwise/helper.py index 96987397d..e0efd630b 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -71,53 +71,18 @@ class SmileHelper(SmileCommon): def __init__(self) -> None: """Set the constructor for this class.""" - self._cooling_present: bool - self._count: int - self._dhw_allowed_modes: list[str] = [] - self._domain_objects: etree self._endpoint: str self._elga: bool self._gateway_id: str - self._gw_allowed_modes: list[str] = [] - self._home_loc_id: str - self._home_location: etree self._is_thermostat: bool self._last_active: dict[str, str | None] - self._last_modified: dict[str, str] = {} self._loc_data: dict[str, ThermoLoc] - self._notifications: dict[str, dict[str, str]] = {} - self._on_off_device: bool - self._opentherm_device: bool - self._reg_allowed_modes: list[str] = [] self._schedule_old_states: dict[str, dict[str, str]] - self._status: etree - self._stretch_v2: bool - self._system: etree - self._thermo_locs: dict[str, ThermoLoc] = {} - ################################################################### - # '_cooling_enabled' can refer to the state of the Elga heatpump - # connected to an Anna. For Elga, 'elga_status_code' in (8, 9) - # means cooling mode is available, next to heating mode. - # 'elga_status_code' = 8 means cooling is active, 9 means idle. - # - # '_cooling_enabled' cam refer to the state of the Loria or - # Thermastage heatpump connected to an Anna. For these, - # 'cooling_enabled' = on means set to cooling mode, instead of to - # heating mode. - # 'cooling_state' = on means cooling is active. - ################################################################### - self._cooling_active = False - self._cooling_enabled = False - - self.gw_entities: dict[str, GwEntityData] self.smile_hw_version: str | None self.smile_mac_address: str | None self.smile_model: str self.smile_model_id: str | None - self.smile_name: str - self.smile_type: str self.smile_version: version.Version | None - self.smile_zigbee_mac_address: str | None self._zones: dict[str, GwEntityData] SmileCommon.__init__(self) @@ -657,7 +622,11 @@ def _update_anna_cooling(self, entity_id: str, data: GwEntityData) -> None: self._update_loria_cooling(data) def _update_elga_cooling(self, data: GwEntityData) -> None: - """# Anna+Elga: base cooling_state on the elga-status-code.""" + """# Anna+Elga: base cooling_state on the elga-status-code. + + For Elga, 'elga_status_code' in (8, 9) means cooling is enabled. + 'elga_status_code' = 8 means cooling is active, 9 means idle. + """ if data["thermostat_supports_cooling"]: # Techneco Elga has cooling-capability self._cooling_present = True @@ -679,7 +648,11 @@ def _update_elga_cooling(self, data: GwEntityData) -> None: self._count -= 1 def _update_loria_cooling(self, data: GwEntityData) -> None: - """Loria/Thermastage: base cooling-related on cooling_state and modulation_level.""" + """Loria/Thermastage: base cooling-related on cooling_state and modulation_level. + + For the Loria or Thermastage heatpump connected to an Anna cooling-enabled is + indicated via the Cooling Enable switch in the Plugwise App. + """ # For Loria/Thermastage it's not clear if cooling_enabled in xml shows the correct status, # setting it specifically: self._cooling_enabled = data["binary_sensors"]["cooling_enabled"] = data[ diff --git a/plugwise/legacy/helper.py b/plugwise/legacy/helper.py index 773fd13a5..98a5444cb 100644 --- a/plugwise/legacy/helper.py +++ b/plugwise/legacy/helper.py @@ -62,29 +62,14 @@ class SmileLegacyHelper(SmileCommon): def __init__(self) -> None: """Set the constructor for this class.""" self._appliances: etree - self._count: int - self._domain_objects: etree - self._heater_id: str - self._home_loc_id: str self._is_thermostat: bool - self._last_modified: dict[str, str] = {} self._loc_data: dict[str, ThermoLoc] self._locations: etree self._modules: etree - self._notifications: dict[str, dict[str, str]] = {} - self._on_off_device: bool - self._opentherm_device: bool - self._outdoor_temp: float - self._status: etree self._stretch_v2: bool - self._system: etree - self.gateway_id: str self.gw_entities: dict[str, GwEntityData] = {} - self.smile_hw_version: str | None self.smile_mac_address: str | None self.smile_model: str - self.smile_name: str - self.smile_type: str self.smile_version: Version | None self.smile_zigbee_mac_address: str | None SmileCommon.__init__(self) diff --git a/plugwise/smile.py b/plugwise/smile.py index b425f0fac..d1b23d031 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -18,7 +18,6 @@ LOCATIONS, MAX_SETPOINT, MIN_SETPOINT, - NONE, NOTIFICATIONS, OFF, RULES, @@ -63,11 +62,8 @@ def __init__( smile_version: Version | None, ) -> None: """Set the constructor for this class.""" - self._cooling_enabled = False self._cooling_present = _cooling_present self._elga = _elga - self._gateway_id: str = NONE - self._heater_id: str = NONE self._is_thermostat = _is_thermostat self._last_active = _last_active self._loc_data = _loc_data From dfb8a5afcaf7081e4d51de3458324547651ef5b3 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 19 Jan 2025 11:47:29 +0100 Subject: [PATCH 18/66] Fix --- tests/test_init.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_init.py b/tests/test_init.py index a15aef075..d3bf403be 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -649,7 +649,6 @@ def test_and_assert(test_dict, data, header): self.entity_list = list(smile.devices.keys()) location_list = smile._loc_data - self.show_setup(location_list, smile.devices) if skip_testing: From 70466c0111252284c47d551576a0b1ef0a69bb06 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 19 Jan 2025 12:13:13 +0100 Subject: [PATCH 19/66] Implement ClientSession-related suggestion --- plugwise/smilecomm.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/plugwise/smilecomm.py b/plugwise/smilecomm.py index d91240f3d..e8f3bea53 100644 --- a/plugwise/smilecomm.py +++ b/plugwise/smilecomm.py @@ -5,8 +5,6 @@ from __future__ import annotations -import asyncio - from plugwise.constants import LOGGER from plugwise.exceptions import ( ConnectionFailedError, @@ -36,17 +34,7 @@ def __init__( """Set the constructor for this class.""" if not websession: aio_timeout = ClientTimeout(total=timeout) - - async def _create_session() -> ClientSession: - return ClientSession(timeout=aio_timeout) # pragma: no cover - - loop = asyncio.get_event_loop() - if loop.is_running(): - self._websession = ClientSession(timeout=aio_timeout) - else: - self._websession = loop.run_until_complete( - _create_session() - ) # pragma: no cover + self._websession = ClientSession(timeout=aio_timeout) else: self._websession = websession From 544ef8bfe1c35f14e4292a5b4fa6f267a4792408 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 19 Jan 2025 12:35:32 +0100 Subject: [PATCH 20/66] Remove gateway-related from the manual_fixtures script --- scripts/manual_fixtures.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/scripts/manual_fixtures.py b/scripts/manual_fixtures.py index 6e5946c92..f69920aae 100755 --- a/scripts/manual_fixtures.py +++ b/scripts/manual_fixtures.py @@ -67,10 +67,6 @@ def json_writer(manual_name: str, all_data: dict) -> None: m_adam_cooling = base.copy() -# Set cooling_present to true, item_count to 89 -m_adam_cooling["gateway"]["cooling_present"] = True -m_adam_cooling["gateway"]["item_count"] = 89 - # Remove devices 67d73d0bd469422db25a618a5fb8eeb0, 29542b2b6a6a4169acecc15c72a599b8 and 10016900610d4c7481df78c89606ef22 from anywhere m_adam_cooling["devices"].pop("29542b2b6a6a4169acecc15c72a599b8") m_adam_cooling["devices"].pop("67d73d0bd469422db25a618a5fb8eeb0") @@ -166,9 +162,6 @@ def json_writer(manual_name: str, all_data: dict) -> None: m_adam_heating = m_adam_cooling.copy() -# Set cooling_present to false -m_adam_heating["gateway"]["cooling_present"] = False - # Correct setpoint for "ad4838d7d35c4d6ea796ee12ae5aedf8" m_adam_heating["devices"]["f2bf9048bef64cc5b6d5110154e33c81"]["thermostat"][ "setpoint" @@ -258,9 +251,6 @@ def json_writer(manual_name: str, all_data: dict) -> None: base = json.load(io) m_anna_heatpump_cooling = base.copy() -# Set cooling_present to true -m_anna_heatpump_cooling["gateway"]["cooling_present"] = True - # Go for 1cbf m_anna_heatpump_cooling["devices"]["1cbf783bb11e4a7c8a6843dee3a86927"][ "model" From c8c9170269e4be98b4a40b58c90d3f61f08bfd20 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 19 Jan 2025 12:36:36 +0100 Subject: [PATCH 21/66] Save updated fixtures --- fixtures/adam_heatpump_cooling/all_data.json | 9 --------- fixtures/adam_jip/all_data.json | 9 --------- .../adam_multiple_devices_per_zone/all_data.json | 13 ------------- .../adam_onoff_cooling_fake_firmware/all_data.json | 9 --------- fixtures/adam_plus_anna/all_data.json | 13 ------------- fixtures/adam_plus_anna_new/all_data.json | 9 --------- .../adam_plus_anna_new_regulation_off/all_data.json | 9 --------- fixtures/adam_zone_per_device/all_data.json | 13 ------------- fixtures/anna_elga_2/all_data.json | 9 --------- fixtures/anna_elga_2_cooling/all_data.json | 9 --------- fixtures/anna_elga_2_schedule_off/all_data.json | 9 --------- fixtures/anna_elga_no_cooling/all_data.json | 9 --------- fixtures/anna_heatpump_cooling/all_data.json | 9 --------- .../all_data.json | 9 --------- fixtures/anna_heatpump_heating/all_data.json | 9 --------- fixtures/anna_loria_cooling_active/all_data.json | 9 --------- fixtures/anna_loria_driessens/all_data.json | 9 --------- fixtures/anna_loria_heating_idle/all_data.json | 9 --------- fixtures/anna_v4/all_data.json | 9 --------- fixtures/anna_v4_dhw/all_data.json | 9 --------- fixtures/anna_v4_no_tag/all_data.json | 9 --------- fixtures/anna_without_boiler_fw441/all_data.json | 9 --------- fixtures/legacy_anna/all_data.json | 7 ------- fixtures/legacy_anna_2/all_data.json | 7 ------- fixtures/m_adam_cooling/all_data.json | 9 --------- fixtures/m_adam_heating/all_data.json | 9 --------- fixtures/m_adam_jip/all_data.json | 9 --------- .../m_adam_multiple_devices_per_zone/all_data.json | 13 ------------- fixtures/m_anna_heatpump_cooling/all_data.json | 9 --------- fixtures/m_anna_heatpump_idle/all_data.json | 9 --------- fixtures/p1v4_442_single/all_data.json | 7 ------- fixtures/p1v4_442_triple/all_data.json | 11 ----------- fixtures/smile_p1_v2/all_data.json | 5 ----- fixtures/smile_p1_v2_2/all_data.json | 5 ----- fixtures/stretch_v23/all_data.json | 5 ----- fixtures/stretch_v27_no_domain/all_data.json | 5 ----- fixtures/stretch_v31/all_data.json | 5 ----- 37 files changed, 325 deletions(-) diff --git a/fixtures/adam_heatpump_cooling/all_data.json b/fixtures/adam_heatpump_cooling/all_data.json index 8c7e1667e..0dd1354b8 100644 --- a/fixtures/adam_heatpump_cooling/all_data.json +++ b/fixtures/adam_heatpump_cooling/all_data.json @@ -804,14 +804,5 @@ }, "vendor": "Plugwise" } - }, - "gateway": { - "cooling_present": true, - "gateway_id": "7d97fc3117784cfdafe347bcedcbbbcb", - "heater_id": "0ca13e8176204ca7bf6f09de59f81c83", - "item_count": 497, - "notifications": {}, - "reboot": true, - "smile_name": "Adam" } } diff --git a/fixtures/adam_jip/all_data.json b/fixtures/adam_jip/all_data.json index 1dfe021ac..de043a536 100644 --- a/fixtures/adam_jip/all_data.json +++ b/fixtures/adam_jip/all_data.json @@ -368,14 +368,5 @@ "vendor": "Plugwise", "zigbee_mac_address": "ABCD012345670A08" } - }, - "gateway": { - "cooling_present": false, - "gateway_id": "b5c2386c6f6342669e50fe49dd05b188", - "heater_id": "e4684553153b44afbef2200885f379dc", - "item_count": 244, - "notifications": {}, - "reboot": true, - "smile_name": "Adam" } } diff --git a/fixtures/adam_multiple_devices_per_zone/all_data.json b/fixtures/adam_multiple_devices_per_zone/all_data.json index 4c8242b35..523f9cfcc 100644 --- a/fixtures/adam_multiple_devices_per_zone/all_data.json +++ b/fixtures/adam_multiple_devices_per_zone/all_data.json @@ -586,18 +586,5 @@ "vendor": "Plugwise", "zigbee_mac_address": "ABCD012345670101" } - }, - "gateway": { - "cooling_present": false, - "gateway_id": "fe799307f1624099878210aa0b9f1475", - "heater_id": "90986d591dcd426cae3ec3e8111ff730", - "item_count": 369, - "notifications": { - "af82e4ccf9c548528166d38e560662a4": { - "warning": "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device." - } - }, - "reboot": true, - "smile_name": "Adam" } } diff --git a/fixtures/adam_onoff_cooling_fake_firmware/all_data.json b/fixtures/adam_onoff_cooling_fake_firmware/all_data.json index fba4e8168..cc357e66e 100644 --- a/fixtures/adam_onoff_cooling_fake_firmware/all_data.json +++ b/fixtures/adam_onoff_cooling_fake_firmware/all_data.json @@ -109,14 +109,5 @@ }, "vendor": "Plugwise" } - }, - "gateway": { - "cooling_present": true, - "gateway_id": "7d97fc3117784cfdafe347bcedcbbbcb", - "heater_id": "0ca13e8176204ca7bf6f09de59f81c83", - "item_count": 64, - "notifications": {}, - "reboot": true, - "smile_name": "Adam" } } diff --git a/fixtures/adam_plus_anna/all_data.json b/fixtures/adam_plus_anna/all_data.json index 1b2b11f71..bf471305e 100644 --- a/fixtures/adam_plus_anna/all_data.json +++ b/fixtures/adam_plus_anna/all_data.json @@ -123,18 +123,5 @@ "vendor": "Plugwise", "zigbee_mac_address": "ABCD012345670A02" } - }, - "gateway": { - "cooling_present": false, - "gateway_id": "b128b4bbbd1f47e9bf4d756e8fb5ee94", - "heater_id": "2743216f626f43948deec1f7ab3b3d70", - "item_count": 80, - "notifications": { - "6fb89e35caeb4b1cb275184895202d84": { - "error": "There is no OpenTherm communication with the boiler." - } - }, - "reboot": true, - "smile_name": "Adam" } } diff --git a/fixtures/adam_plus_anna_new/all_data.json b/fixtures/adam_plus_anna_new/all_data.json index 9e074f344..f189f2c0f 100644 --- a/fixtures/adam_plus_anna_new/all_data.json +++ b/fixtures/adam_plus_anna_new/all_data.json @@ -283,14 +283,5 @@ }, "vendor": "Plugwise" } - }, - "gateway": { - "cooling_present": false, - "gateway_id": "da224107914542988a88561b4452b0f6", - "heater_id": "056ee145a816487eaa69243c3280f8bf", - "item_count": 177, - "notifications": {}, - "reboot": true, - "smile_name": "Adam" } } diff --git a/fixtures/adam_plus_anna_new_regulation_off/all_data.json b/fixtures/adam_plus_anna_new_regulation_off/all_data.json index 8d447dc81..db3c33f47 100644 --- a/fixtures/adam_plus_anna_new_regulation_off/all_data.json +++ b/fixtures/adam_plus_anna_new_regulation_off/all_data.json @@ -283,14 +283,5 @@ }, "vendor": "Plugwise" } - }, - "gateway": { - "cooling_present": false, - "gateway_id": "da224107914542988a88561b4452b0f6", - "heater_id": "056ee145a816487eaa69243c3280f8bf", - "item_count": 177, - "notifications": {}, - "reboot": true, - "smile_name": "Adam" } } diff --git a/fixtures/adam_zone_per_device/all_data.json b/fixtures/adam_zone_per_device/all_data.json index a8d028c19..b16d8807c 100644 --- a/fixtures/adam_zone_per_device/all_data.json +++ b/fixtures/adam_zone_per_device/all_data.json @@ -583,18 +583,5 @@ "vendor": "Plugwise", "zigbee_mac_address": "ABCD012345670101" } - }, - "gateway": { - "cooling_present": false, - "gateway_id": "fe799307f1624099878210aa0b9f1475", - "heater_id": "90986d591dcd426cae3ec3e8111ff730", - "item_count": 369, - "notifications": { - "af82e4ccf9c548528166d38e560662a4": { - "warning": "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device." - } - }, - "reboot": true, - "smile_name": "Adam" } } diff --git a/fixtures/anna_elga_2/all_data.json b/fixtures/anna_elga_2/all_data.json index a3a7c4365..e7a3b244b 100644 --- a/fixtures/anna_elga_2/all_data.json +++ b/fixtures/anna_elga_2/all_data.json @@ -82,14 +82,5 @@ }, "vendor": "Plugwise" } - }, - "gateway": { - "cooling_present": true, - "gateway_id": "fb49af122f6e4b0f91267e1cf7666d6f", - "heater_id": "573c152e7d4f4720878222bd75638f5b", - "item_count": 60, - "notifications": {}, - "reboot": true, - "smile_name": "Smile Anna" } } diff --git a/fixtures/anna_elga_2_cooling/all_data.json b/fixtures/anna_elga_2_cooling/all_data.json index ccb6f4195..064248808 100644 --- a/fixtures/anna_elga_2_cooling/all_data.json +++ b/fixtures/anna_elga_2_cooling/all_data.json @@ -88,14 +88,5 @@ }, "vendor": "Plugwise" } - }, - "gateway": { - "cooling_present": true, - "gateway_id": "fb49af122f6e4b0f91267e1cf7666d6f", - "heater_id": "573c152e7d4f4720878222bd75638f5b", - "item_count": 64, - "notifications": {}, - "reboot": true, - "smile_name": "Smile Anna" } } diff --git a/fixtures/anna_elga_2_schedule_off/all_data.json b/fixtures/anna_elga_2_schedule_off/all_data.json index e8c247b99..132c3bcb0 100644 --- a/fixtures/anna_elga_2_schedule_off/all_data.json +++ b/fixtures/anna_elga_2_schedule_off/all_data.json @@ -88,14 +88,5 @@ }, "vendor": "Plugwise" } - }, - "gateway": { - "cooling_present": true, - "gateway_id": "fb49af122f6e4b0f91267e1cf7666d6f", - "heater_id": "573c152e7d4f4720878222bd75638f5b", - "item_count": 64, - "notifications": {}, - "reboot": true, - "smile_name": "Smile Anna" } } diff --git a/fixtures/anna_elga_no_cooling/all_data.json b/fixtures/anna_elga_no_cooling/all_data.json index b04e42722..2abfc6c21 100644 --- a/fixtures/anna_elga_no_cooling/all_data.json +++ b/fixtures/anna_elga_no_cooling/all_data.json @@ -90,14 +90,5 @@ }, "vendor": "Plugwise" } - }, - "gateway": { - "cooling_present": false, - "gateway_id": "015ae9ea3f964e668e490fa39da3870b", - "heater_id": "1cbf783bb11e4a7c8a6843dee3a86927", - "item_count": 64, - "notifications": {}, - "reboot": true, - "smile_name": "Smile Anna" } } diff --git a/fixtures/anna_heatpump_cooling/all_data.json b/fixtures/anna_heatpump_cooling/all_data.json index c5f7d3273..1cb97ff31 100644 --- a/fixtures/anna_heatpump_cooling/all_data.json +++ b/fixtures/anna_heatpump_cooling/all_data.json @@ -89,14 +89,5 @@ }, "vendor": "Plugwise" } - }, - "gateway": { - "cooling_present": true, - "gateway_id": "015ae9ea3f964e668e490fa39da3870b", - "heater_id": "1cbf783bb11e4a7c8a6843dee3a86927", - "item_count": 65, - "notifications": {}, - "reboot": true, - "smile_name": "Smile Anna" } } diff --git a/fixtures/anna_heatpump_cooling_fake_firmware/all_data.json b/fixtures/anna_heatpump_cooling_fake_firmware/all_data.json index 1021c610a..ecbb51ef3 100644 --- a/fixtures/anna_heatpump_cooling_fake_firmware/all_data.json +++ b/fixtures/anna_heatpump_cooling_fake_firmware/all_data.json @@ -89,14 +89,5 @@ }, "vendor": "Plugwise" } - }, - "gateway": { - "cooling_present": true, - "gateway_id": "015ae9ea3f964e668e490fa39da3870b", - "heater_id": "1cbf783bb11e4a7c8a6843dee3a86927", - "item_count": 65, - "notifications": {}, - "reboot": true, - "smile_name": "Smile Anna" } } diff --git a/fixtures/anna_heatpump_heating/all_data.json b/fixtures/anna_heatpump_heating/all_data.json index 66f7235d4..283ad7c98 100644 --- a/fixtures/anna_heatpump_heating/all_data.json +++ b/fixtures/anna_heatpump_heating/all_data.json @@ -94,14 +94,5 @@ }, "vendor": "Plugwise" } - }, - "gateway": { - "cooling_present": true, - "gateway_id": "015ae9ea3f964e668e490fa39da3870b", - "heater_id": "1cbf783bb11e4a7c8a6843dee3a86927", - "item_count": 68, - "notifications": {}, - "reboot": true, - "smile_name": "Smile Anna" } } diff --git a/fixtures/anna_loria_cooling_active/all_data.json b/fixtures/anna_loria_cooling_active/all_data.json index 24f142bd7..aabfa8f80 100644 --- a/fixtures/anna_loria_cooling_active/all_data.json +++ b/fixtures/anna_loria_cooling_active/all_data.json @@ -93,14 +93,5 @@ }, "vendor": "Atlantic" } - }, - "gateway": { - "cooling_present": true, - "gateway_id": "9ff0569b4984459fb243af64c0901894", - "heater_id": "bfb5ee0a88e14e5f97bfa725a760cc49", - "item_count": 67, - "notifications": {}, - "reboot": true, - "smile_name": "Smile Anna" } } diff --git a/fixtures/anna_loria_driessens/all_data.json b/fixtures/anna_loria_driessens/all_data.json index 5e047db7b..34cf37733 100644 --- a/fixtures/anna_loria_driessens/all_data.json +++ b/fixtures/anna_loria_driessens/all_data.json @@ -99,14 +99,5 @@ }, "vendor": "Atlantic" } - }, - "gateway": { - "cooling_present": true, - "gateway_id": "5c118b1842e943c0a5b6ef88a60bb17a", - "heater_id": "a449cbc334ae4a5bb7f89064984b2906", - "item_count": 67, - "notifications": {}, - "reboot": true, - "smile_name": "Smile Anna" } } diff --git a/fixtures/anna_loria_heating_idle/all_data.json b/fixtures/anna_loria_heating_idle/all_data.json index e5ef0f9b8..2790624f6 100644 --- a/fixtures/anna_loria_heating_idle/all_data.json +++ b/fixtures/anna_loria_heating_idle/all_data.json @@ -93,14 +93,5 @@ }, "vendor": "Atlantic" } - }, - "gateway": { - "cooling_present": true, - "gateway_id": "9ff0569b4984459fb243af64c0901894", - "heater_id": "bfb5ee0a88e14e5f97bfa725a760cc49", - "item_count": 67, - "notifications": {}, - "reboot": true, - "smile_name": "Smile Anna" } } diff --git a/fixtures/anna_v4/all_data.json b/fixtures/anna_v4/all_data.json index 2df4e9c2e..bcda4c000 100644 --- a/fixtures/anna_v4/all_data.json +++ b/fixtures/anna_v4/all_data.json @@ -85,14 +85,5 @@ }, "vendor": "Bosch Thermotechniek B.V." } - }, - "gateway": { - "cooling_present": false, - "gateway_id": "0466eae8520144c78afb29628384edeb", - "heater_id": "cd0e6156b1f04d5f952349ffbe397481", - "item_count": 59, - "notifications": {}, - "reboot": true, - "smile_name": "Smile Anna" } } diff --git a/fixtures/anna_v4_dhw/all_data.json b/fixtures/anna_v4_dhw/all_data.json index fe8e1e927..783fdf1f8 100644 --- a/fixtures/anna_v4_dhw/all_data.json +++ b/fixtures/anna_v4_dhw/all_data.json @@ -85,14 +85,5 @@ }, "vendor": "Bosch Thermotechniek B.V." } - }, - "gateway": { - "cooling_present": false, - "gateway_id": "0466eae8520144c78afb29628384edeb", - "heater_id": "cd0e6156b1f04d5f952349ffbe397481", - "item_count": 59, - "notifications": {}, - "reboot": true, - "smile_name": "Smile Anna" } } diff --git a/fixtures/anna_v4_no_tag/all_data.json b/fixtures/anna_v4_no_tag/all_data.json index 3208f547e..37da0174e 100644 --- a/fixtures/anna_v4_no_tag/all_data.json +++ b/fixtures/anna_v4_no_tag/all_data.json @@ -85,14 +85,5 @@ }, "vendor": "Bosch Thermotechniek B.V." } - }, - "gateway": { - "cooling_present": false, - "gateway_id": "0466eae8520144c78afb29628384edeb", - "heater_id": "cd0e6156b1f04d5f952349ffbe397481", - "item_count": 59, - "notifications": {}, - "reboot": true, - "smile_name": "Smile Anna" } } diff --git a/fixtures/anna_without_boiler_fw441/all_data.json b/fixtures/anna_without_boiler_fw441/all_data.json index b72c1d90c..ebd3a07ad 100644 --- a/fixtures/anna_without_boiler_fw441/all_data.json +++ b/fixtures/anna_without_boiler_fw441/all_data.json @@ -58,14 +58,5 @@ "model": "Unknown", "name": "OnOff" } - }, - "gateway": { - "cooling_present": false, - "gateway_id": "a270735e4ccd45239424badc0578a2b1", - "heater_id": "c46b4794d28149699eacf053deedd003", - "item_count": 40, - "notifications": {}, - "reboot": true, - "smile_name": "Smile Anna" } } diff --git a/fixtures/legacy_anna/all_data.json b/fixtures/legacy_anna/all_data.json index 9275b82cd..b8162f896 100644 --- a/fixtures/legacy_anna/all_data.json +++ b/fixtures/legacy_anna/all_data.json @@ -58,12 +58,5 @@ }, "vendor": "Plugwise" } - }, - "gateway": { - "cooling_present": false, - "gateway_id": "0000aaaa0000aaaa0000aaaa0000aa00", - "heater_id": "04e4cbfe7f4340f090f85ec3b9e6a950", - "item_count": 41, - "smile_name": "Smile Anna" } } diff --git a/fixtures/legacy_anna_2/all_data.json b/fixtures/legacy_anna_2/all_data.json index 05043b02e..0b60d7b4a 100644 --- a/fixtures/legacy_anna_2/all_data.json +++ b/fixtures/legacy_anna_2/all_data.json @@ -62,12 +62,5 @@ "water_temperature": 54.0 } } - }, - "gateway": { - "cooling_present": false, - "gateway_id": "be81e3f8275b4129852c4d8d550ae2eb", - "heater_id": "ea5d8a7177e541b0a4b52da815166de4", - "item_count": 43, - "smile_name": "Smile Anna" } } diff --git a/fixtures/m_adam_cooling/all_data.json b/fixtures/m_adam_cooling/all_data.json index af6d4b833..f862f5ca2 100644 --- a/fixtures/m_adam_cooling/all_data.json +++ b/fixtures/m_adam_cooling/all_data.json @@ -200,14 +200,5 @@ }, "vendor": "Plugwise" } - }, - "gateway": { - "cooling_present": true, - "gateway_id": "da224107914542988a88561b4452b0f6", - "heater_id": "056ee145a816487eaa69243c3280f8bf", - "item_count": 89, - "notifications": {}, - "reboot": true, - "smile_name": "Adam" } } diff --git a/fixtures/m_adam_heating/all_data.json b/fixtures/m_adam_heating/all_data.json index bb24faeeb..7ae58aa8d 100644 --- a/fixtures/m_adam_heating/all_data.json +++ b/fixtures/m_adam_heating/all_data.json @@ -199,14 +199,5 @@ }, "vendor": "Plugwise" } - }, - "gateway": { - "cooling_present": false, - "gateway_id": "da224107914542988a88561b4452b0f6", - "heater_id": "056ee145a816487eaa69243c3280f8bf", - "item_count": 89, - "notifications": {}, - "reboot": true, - "smile_name": "Adam" } } diff --git a/fixtures/m_adam_jip/all_data.json b/fixtures/m_adam_jip/all_data.json index 1a3ef66c1..1b87955ad 100644 --- a/fixtures/m_adam_jip/all_data.json +++ b/fixtures/m_adam_jip/all_data.json @@ -367,14 +367,5 @@ "vendor": "Plugwise", "zigbee_mac_address": "ABCD012345670A08" } - }, - "gateway": { - "cooling_present": false, - "gateway_id": "b5c2386c6f6342669e50fe49dd05b188", - "heater_id": "e4684553153b44afbef2200885f379dc", - "item_count": 244, - "notifications": {}, - "reboot": true, - "smile_name": "Adam" } } diff --git a/fixtures/m_adam_multiple_devices_per_zone/all_data.json b/fixtures/m_adam_multiple_devices_per_zone/all_data.json index 8da184a7a..420f6c874 100644 --- a/fixtures/m_adam_multiple_devices_per_zone/all_data.json +++ b/fixtures/m_adam_multiple_devices_per_zone/all_data.json @@ -577,18 +577,5 @@ "vendor": "Plugwise", "zigbee_mac_address": "ABCD012345670101" } - }, - "gateway": { - "cooling_present": false, - "gateway_id": "fe799307f1624099878210aa0b9f1475", - "heater_id": "90986d591dcd426cae3ec3e8111ff730", - "item_count": 369, - "notifications": { - "af82e4ccf9c548528166d38e560662a4": { - "warning": "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device." - } - }, - "reboot": true, - "smile_name": "Adam" } } diff --git a/fixtures/m_anna_heatpump_cooling/all_data.json b/fixtures/m_anna_heatpump_cooling/all_data.json index d05cb6d5b..deaf93067 100644 --- a/fixtures/m_anna_heatpump_cooling/all_data.json +++ b/fixtures/m_anna_heatpump_cooling/all_data.json @@ -94,14 +94,5 @@ }, "vendor": "Plugwise" } - }, - "gateway": { - "cooling_present": true, - "gateway_id": "015ae9ea3f964e668e490fa39da3870b", - "heater_id": "1cbf783bb11e4a7c8a6843dee3a86927", - "item_count": 68, - "notifications": {}, - "reboot": true, - "smile_name": "Smile Anna" } } diff --git a/fixtures/m_anna_heatpump_idle/all_data.json b/fixtures/m_anna_heatpump_idle/all_data.json index 181dbb77e..503fc06b8 100644 --- a/fixtures/m_anna_heatpump_idle/all_data.json +++ b/fixtures/m_anna_heatpump_idle/all_data.json @@ -94,14 +94,5 @@ }, "vendor": "Plugwise" } - }, - "gateway": { - "cooling_present": true, - "gateway_id": "015ae9ea3f964e668e490fa39da3870b", - "heater_id": "1cbf783bb11e4a7c8a6843dee3a86927", - "item_count": 68, - "notifications": {}, - "reboot": true, - "smile_name": "Smile Anna" } } diff --git a/fixtures/p1v4_442_single/all_data.json b/fixtures/p1v4_442_single/all_data.json index 3ea4bb01b..bd4397c85 100644 --- a/fixtures/p1v4_442_single/all_data.json +++ b/fixtures/p1v4_442_single/all_data.json @@ -40,12 +40,5 @@ }, "vendor": "SHENZHEN KAIFA TECHNOLOGY \uff08CHENGDU\uff09 CO., LTD." } - }, - "gateway": { - "gateway_id": "a455b61e52394b2db5081ce025a430f3", - "item_count": 32, - "notifications": {}, - "reboot": true, - "smile_name": "Smile P1" } } diff --git a/fixtures/p1v4_442_triple/all_data.json b/fixtures/p1v4_442_triple/all_data.json index b7476b24a..f455c5bad 100644 --- a/fixtures/p1v4_442_triple/all_data.json +++ b/fixtures/p1v4_442_triple/all_data.json @@ -49,16 +49,5 @@ }, "vendor": "XEMEX NV" } - }, - "gateway": { - "gateway_id": "03e65b16e4b247a29ae0d75a78cb492e", - "item_count": 41, - "notifications": { - "97a04c0c263049b29350a660b4cdd01e": { - "warning": "The Smile P1 is not connected to a smart meter." - } - }, - "reboot": true, - "smile_name": "Smile P1" } } diff --git a/fixtures/smile_p1_v2/all_data.json b/fixtures/smile_p1_v2/all_data.json index 5d970d401..bc37c8f01 100644 --- a/fixtures/smile_p1_v2/all_data.json +++ b/fixtures/smile_p1_v2/all_data.json @@ -32,10 +32,5 @@ "name": "Smile P1", "vendor": "Plugwise" } - }, - "gateway": { - "gateway_id": "aaaa0000aaaa0000aaaa0000aaaa00aa", - "item_count": 26, - "smile_name": "Smile P1" } } diff --git a/fixtures/smile_p1_v2_2/all_data.json b/fixtures/smile_p1_v2_2/all_data.json index 3cc59aa60..c38f15f81 100644 --- a/fixtures/smile_p1_v2_2/all_data.json +++ b/fixtures/smile_p1_v2_2/all_data.json @@ -32,10 +32,5 @@ "name": "Smile P1", "vendor": "Plugwise" } - }, - "gateway": { - "gateway_id": "aaaa0000aaaa0000aaaa0000aaaa00aa", - "item_count": 26, - "smile_name": "Smile P1" } } diff --git a/fixtures/stretch_v23/all_data.json b/fixtures/stretch_v23/all_data.json index e4c0326ea..6b0c67708 100644 --- a/fixtures/stretch_v23/all_data.json +++ b/fixtures/stretch_v23/all_data.json @@ -352,10 +352,5 @@ "vendor": "Plugwise", "zigbee_mac_address": "ABCD012345670A06" } - }, - "gateway": { - "gateway_id": "0000aaaa0000aaaa0000aaaa0000aa00", - "item_count": 243, - "smile_name": "Stretch" } } diff --git a/fixtures/stretch_v27_no_domain/all_data.json b/fixtures/stretch_v27_no_domain/all_data.json index 042cfe538..d615ae1d2 100644 --- a/fixtures/stretch_v27_no_domain/all_data.json +++ b/fixtures/stretch_v27_no_domain/all_data.json @@ -270,10 +270,5 @@ "vendor": "Plugwise", "zigbee_mac_address": "ABCD012345670A11" } - }, - "gateway": { - "gateway_id": "0000aaaa0000aaaa0000aaaa0000aa00", - "item_count": 190, - "smile_name": "Stretch" } } diff --git a/fixtures/stretch_v31/all_data.json b/fixtures/stretch_v31/all_data.json index b1675116b..a4a0b7b1d 100644 --- a/fixtures/stretch_v31/all_data.json +++ b/fixtures/stretch_v31/all_data.json @@ -134,10 +134,5 @@ "vendor": "Plugwise", "zigbee_mac_address": "0123456789AB" } - }, - "gateway": { - "gateway_id": "0000aaaa0000aaaa0000aaaa0000aa00", - "item_count": 83, - "smile_name": "Stretch" } } From 8c035ffcc544596a7aa11044699862f986c639d1 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 19 Jan 2025 12:42:11 +0100 Subject: [PATCH 22/66] Bump to v1.7.0a0 test-version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b573a777e..522f26631 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plugwise" -version = "1.6.4" +version = "1.7.0a0" license = {file = "LICENSE"} description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3." readme = "README.md" From 09a40db03a7ef7855f9adcc643786734cc79c954 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 19 Jan 2025 12:47:56 +0100 Subject: [PATCH 23/66] Bump to a2, a1 exists --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 522f26631..976eadea2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plugwise" -version = "1.7.0a0" +version = "1.7.0a2" license = {file = "LICENSE"} description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3." readme = "README.md" From ec63b5347e2bb6975990d1326016e675007a4193 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 19 Jan 2025 16:46:45 +0100 Subject: [PATCH 24/66] Remove devices property, let async_update() return data --- plugwise/__init__.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/plugwise/__init__.py b/plugwise/__init__.py index a26f82da4..e8ecfd0c9 100644 --- a/plugwise/__init__.py +++ b/plugwise/__init__.py @@ -63,7 +63,6 @@ def __init__( ) self._cooling_present = False - self._devices: dict[str, GwEntityData] = {} self._elga = False self._is_thermostat = False self._last_active: dict[str, str | None] = {} @@ -93,11 +92,6 @@ def cooling_present(self) -> bool: return self._smile_props["cooling_present"] return False - @property - def devices(self) -> dict[str, GwEntityData]: - """Return all devices and their data.""" - return self._devices - @property def gateway_id(self) -> str: """Return the gateway-id.""" @@ -344,13 +338,16 @@ def get_all_gateway_entities(self) -> None: """Collect the Plugwise Gateway entities and their data and states from the received raw XML-data.""" self._smile_api.get_all_gateway_entities() - async def async_update(self) -> None: + async def async_update(self) -> dict[str, GwEntityData]: """Update the Plughwise Gateway entities and their data and states.""" + data: dict[str, GwEntityData] = {} try: - self._devices = await self._smile_api.async_update() + data = await self._smile_api.async_update() except (DataMissingError, KeyError) as err: raise PlugwiseError("No Plugwise data received") from err + return data + ######################################################################################################## ### API Set and HA Service-related Functions ### ######################################################################################################## From a08660daf68593b2acff3a3fa77becdb2a2f9e52 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 19 Jan 2025 16:48:41 +0100 Subject: [PATCH 25/66] Adapt testcode --- tests/test_init.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/test_init.py b/tests/test_init.py index d3bf403be..f9e4ad97a 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -608,19 +608,19 @@ def test_and_assert(test_dict, data, header): if smile.smile_legacy: await smile.full_xml_update() smile.get_all_gateway_entities() - await smile.async_update() + data = await smile.async_update() assert smile._timeout == 30 else: - await smile.async_update() + data = await smile.async_update() assert smile._timeout == 10 else: _LOGGER.info("Asserting updated testdata:") - await smile.async_update() + data = await smile.async_update() _LOGGER.info("Gateway id = %s", smile.gateway_id) _LOGGER.info("Heater id = %s", smile.heater_id) _LOGGER.info("Hostname = %s", smile.smile_hostname) - _LOGGER.info("Entities list = %s", smile.devices) + _LOGGER.info("Entities list = %s", data) self.cooling_present = smile.cooling_present self.notifications = smile.notifications @@ -629,7 +629,7 @@ def test_and_assert(test_dict, data, header): self._cooling_active = False self._cooling_enabled = False if smile.heater_id != "None": - heat_cooler = smile.devices[smile.heater_id] + heat_cooler = data[smile.heater_id] if "binary_sensors" in heat_cooler: if "cooling_enabled" in heat_cooler["binary_sensors"]: self._cooling_enabled = heat_cooler["binary_sensors"][ @@ -640,23 +640,23 @@ def test_and_assert(test_dict, data, header): "cooling_state" ] - self._write_json("all_data", {"devices": smile.devices}) + self._write_json("all_data", {"devices": data}) if "FIXTURES" in os.environ: _LOGGER.info("Skipping tests: Requested fixtures only") # pragma: no cover return # pragma: no cover - self.entity_list = list(smile.devices.keys()) + self.entity_list = list(data.keys()) location_list = smile._loc_data - self.show_setup(location_list, smile.devices) + self.show_setup(location_list, data) if skip_testing: return # Perform tests and asserts in two steps: devices and zones for header, data_dict in testdata.items(): - test_and_assert(data_dict, smile.devices, header) + test_and_assert(data_dict, data, header) # pragma warning restore S3776 From de773dcbbb087096ce926cbd6037e8ce49fae170 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 19 Jan 2025 17:09:26 +0100 Subject: [PATCH 26/66] Remove notifications property, add to gateway data --- plugwise/__init__.py | 7 ------- plugwise/data.py | 4 ++-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/plugwise/__init__.py b/plugwise/__init__.py index e8ecfd0c9..64c523b5c 100644 --- a/plugwise/__init__.py +++ b/plugwise/__init__.py @@ -109,13 +109,6 @@ def item_count(self) -> int: """Return the item-count.""" return self._smile_props["item_count"] - @property - def notifications(self) -> dict[str, dict[str, str]]: - """Return the Plugwise notifications.""" - if "notifications" in self._smile_props: - return self._smile_props["notifications"] - return {} - @property def reboot(self) -> bool: """Return the reboot capability. diff --git a/plugwise/data.py b/plugwise/data.py index cd158b790..ae14f2f86 100644 --- a/plugwise/data.py +++ b/plugwise/data.py @@ -43,7 +43,6 @@ def _all_entity_data(self) -> None: self._smile_props["gateway_id"] = self._gateway_id self._smile_props["item_count"] = self._count - self._smile_props["notifications"] = self._notifications self._smile_props["reboot"] = True self._smile_props["smile_name"] = self.smile_name if self._is_thermostat: @@ -128,7 +127,8 @@ def _add_or_update_notifications( and "plugwise_notification" in entity["binary_sensors"] ): data["binary_sensors"]["plugwise_notification"] = bool(self._notifications) - self._count += 1 + data["notifications"] = self._notifications + self._count += 2 def _update_for_cooling(self, entity: GwEntityData) -> None: """Helper-function for adding/updating various cooling-related values.""" From b0152e418e7238184753d7b7f2127c4cba1f03a1 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 19 Jan 2025 17:11:31 +0100 Subject: [PATCH 27/66] Adapt testcode --- tests/test_init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_init.py b/tests/test_init.py index f9e4ad97a..140ef70e9 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -623,7 +623,7 @@ def test_and_assert(test_dict, data, header): _LOGGER.info("Entities list = %s", data) self.cooling_present = smile.cooling_present - self.notifications = smile.notifications + self.notifications = data[smile.gateway_id]["notifications"] self.entity_items = smile.item_count self._cooling_active = False From e7a43cc2a08137782113c16750bdbc7aebf77751 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 19 Jan 2025 17:16:55 +0100 Subject: [PATCH 28/66] Fixes --- plugwise/constants.py | 2 +- plugwise/helper.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugwise/constants.py b/plugwise/constants.py index d216e4cdc..7d406ad94 100644 --- a/plugwise/constants.py +++ b/plugwise/constants.py @@ -400,7 +400,6 @@ class SmileProps(TypedDict, total=False): gateway_id: str heater_id: str item_count: int - notifications: dict[str, dict[str, str]] reboot: bool smile_name: str @@ -551,6 +550,7 @@ class GwEntityData(TypedDict, total=False): # Gateway gateway_modes: list[str] + notifications: dict[str, dict[str, str]] regulation_modes: list[str] select_gateway_mode: str select_regulation_mode: str diff --git a/plugwise/helper.py b/plugwise/helper.py index e0efd630b..7ea6d73f6 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -446,7 +446,7 @@ def _get_plugwise_notifications(self) -> None: msg_id = notification.attrib["id"] msg_type = notification.find("type").text msg = notification.find("message").text - self._notifications.update({msg_id: {msg_type: msg}}) + self._notifications[msg_id] = {msg_type: msg} LOGGER.debug("Plugwise notifications: %s", self._notifications) except AttributeError: # pragma: no cover LOGGER.debug( From 83557ac2ce69ac431d73ab89be1a8abb7ba67239 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 19 Jan 2025 17:42:08 +0100 Subject: [PATCH 29/66] Update entity_items asserts --- tests/test_adam.py | 14 +++++++------- tests/test_anna.py | 30 +++++++++++++++--------------- tests/test_p1.py | 4 ++-- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/tests/test_adam.py b/tests/test_adam.py index ab37a6d8b..2378d7f41 100644 --- a/tests/test_adam.py +++ b/tests/test_adam.py @@ -36,7 +36,7 @@ async def test_connect_adam_plus_anna_new(self): assert smile.gateway_id == "da224107914542988a88561b4452b0f6" assert smile._last_active["f2bf9048bef64cc5b6d5110154e33c81"] == "Weekschema" assert smile._last_active["f871b8c4d63549319221e294e4f88074"] == "Badkamer" - assert self.entity_items == 177 + assert self.entity_items == 178 assert self.entity_list == [ "da224107914542988a88561b4452b0f6", "056ee145a816487eaa69243c3280f8bf", @@ -208,7 +208,7 @@ async def test_connect_adam_zone_per_device(self): assert smile._last_active["82fa13f017d240daa0d0ea1775420f24"] == CV_JESSIE assert smile._last_active["08963fec7c53423ca5680aa4cb502c63"] == BADKAMER_SCHEMA assert smile._last_active["446ac08dd04d4eff8ac57489757b7314"] == BADKAMER_SCHEMA - assert self.entity_items == 369 + assert self.entity_items == 370 assert "af82e4ccf9c548528166d38e560662a4" in self.notifications await smile.delete_notification() @@ -288,7 +288,7 @@ async def test_connect_adam_multiple_devices_per_zone(self): assert smile._last_active["82fa13f017d240daa0d0ea1775420f24"] == CV_JESSIE assert smile._last_active["08963fec7c53423ca5680aa4cb502c63"] == BADKAMER_SCHEMA assert smile._last_active["446ac08dd04d4eff8ac57489757b7314"] == BADKAMER_SCHEMA - assert self.entity_items == 369 + assert self.entity_items == 370 assert "af82e4ccf9c548528166d38e560662a4" in self.notifications @@ -326,7 +326,7 @@ async def test_adam_heatpump_cooling(self): assert smile._last_active["a562019b0b1f47a4bde8ebe3dbe3e8a9"] == WERKDAG_SCHEMA assert smile._last_active["8cf650a4c10c44819e426bed406aec34"] == WERKDAG_SCHEMA assert smile._last_active["5cc21042f87f4b4c94ccb5537c47a53f"] == WERKDAG_SCHEMA - assert self.entity_items == 497 + assert self.entity_items == 498 assert self.cooling_present assert self._cooling_enabled @@ -349,7 +349,7 @@ async def test_connect_adam_onoff_cooling_fake_firmware(self): ) await self.device_test(smile, "2022-01-02 00:00:01", testdata) - assert self.entity_items == 64 + assert self.entity_items == 65 assert self.cooling_present # assert self._cooling_enabled - no cooling_enabled indication present @@ -374,7 +374,7 @@ async def test_connect_adam_plus_anna(self): await self.device_test(smile, "2020-03-22 00:00:01", testdata) assert smile.gateway_id == "b128b4bbbd1f47e9bf4d756e8fb5ee94" assert smile._last_active["009490cc2f674ce6b576863fbb64f867"] == "Weekschema" - assert self.entity_items == 80 + assert self.entity_items == 81 assert "6fb89e35caeb4b1cb275184895202d84" in self.notifications result = await self.tinker_thermostat( @@ -420,7 +420,7 @@ async def test_adam_plus_jip(self): assert smile._last_active["06aecb3d00354375924f50c47af36bd2"] is None assert smile._last_active["d27aede973b54be484f6842d1b2802ad"] is None assert smile._last_active["13228dab8ce04617af318a2888b3c548"] is None - assert self.entity_items == 244 + assert self.entity_items == 245 # Negative test result = await self.tinker_thermostat( diff --git a/tests/test_anna.py b/tests/test_anna.py index 64596f6ef..bce21b1ab 100644 --- a/tests/test_anna.py +++ b/tests/test_anna.py @@ -30,7 +30,7 @@ async def test_connect_anna_v4(self): await self.device_test(smile, "2020-04-05 00:00:01", testdata) assert smile.gateway_id == "0466eae8520144c78afb29628384edeb" assert smile._last_active["eb5309212bf5407bb143e5bfa3b18aee"] == "Standaard" - assert self.entity_items == 59 + assert self.entity_items == 60 assert not self.notifications assert not self.cooling_present @@ -109,7 +109,7 @@ async def test_connect_anna_v4_dhw(self): await self.device_test(smile, "2020-04-05 00:00:01", testdata) assert smile._last_active["eb5309212bf5407bb143e5bfa3b18aee"] == "Standaard" - assert self.entity_items == 59 + assert self.entity_items == 60 assert not self.notifications result = await self.tinker_thermostat( @@ -138,7 +138,7 @@ async def test_connect_anna_v4_no_tag(self): ) await self.device_test(smile, "2020-04-05 00:00:01", testdata) - assert self.entity_items == 59 + assert self.entity_items == 60 result = await self.tinker_thermostat( smile, @@ -167,7 +167,7 @@ async def test_connect_anna_without_boiler_fw441(self): await self.device_test(smile, "2022-05-16 00:00:01", testdata) assert smile._last_active["c34c6864216446528e95d88985e714cc"] == "Normaal" - assert self.entity_items == 40 + assert self.entity_items == 41 assert not self.notifications result = await self.tinker_thermostat( @@ -196,7 +196,7 @@ async def test_connect_anna_heatpump_heating(self): await self.device_test(smile, "2020-04-12 00:00:01", testdata) assert smile.gateway_id == "015ae9ea3f964e668e490fa39da3870b" assert smile._last_active["c784ee9fdab44e1395b8dee7d7a497d5"] == "standaard" - assert self.entity_items == 68 + assert self.entity_items == 69 assert not self.notifications assert self.cooling_present assert not self._cooling_enabled @@ -226,7 +226,7 @@ async def test_connect_anna_heatpump_heating(self): await self.device_test( smile, "2020-04-13 00:00:01", testdata_updated, initialize=False ) - assert self.entity_items == 65 + assert self.entity_items == 66 await smile.close_connection() await self.disconnect(server, client) @@ -252,7 +252,7 @@ async def test_connect_anna_heatpump_cooling(self): await self.device_test(smile, "2020-04-19 00:00:01", testdata) assert smile._last_active["c784ee9fdab44e1395b8dee7d7a497d5"] == "standaard" - assert self.entity_items == 65 + assert self.entity_items == 66 assert self.cooling_present assert not self.notifications @@ -298,7 +298,7 @@ async def test_connect_anna_heatpump_cooling_fake_firmware(self): ) await self.device_test(smile, "2020-04-19 00:00:01", testdata) - assert self.entity_items == 65 + assert self.entity_items == 66 assert self.cooling_present assert self._cooling_enabled assert self._cooling_active @@ -325,7 +325,7 @@ async def test_connect_anna_elga_no_cooling(self): await self.device_test(smile, "2020-04-12 00:00:01", testdata) assert smile.gateway_id == "015ae9ea3f964e668e490fa39da3870b" assert smile._last_active["c784ee9fdab44e1395b8dee7d7a497d5"] == "standaard" - assert self.entity_items == 64 + assert self.entity_items == 65 assert not self.notifications assert not self.cooling_present @@ -352,7 +352,7 @@ async def test_connect_anna_elga_2(self): smile._last_active["d3ce834534114348be628b61b26d9220"] == THERMOSTAT_SCHEDULE ) - assert self.entity_items == 60 + assert self.entity_items == 61 assert smile.gateway_id == "fb49af122f6e4b0f91267e1cf7666d6f" assert self.cooling_present assert not self._cooling_enabled @@ -377,7 +377,7 @@ async def test_connect_anna_elga_2_schedule_off(self): ) assert self.cooling_present assert not self._cooling_enabled - assert self.entity_items == 64 + assert self.entity_items == 65 await smile.close_connection() await self.disconnect(server, client) @@ -406,7 +406,7 @@ async def test_connect_anna_elga_2_cooling(self): smile._last_active["d3ce834534114348be628b61b26d9220"] == THERMOSTAT_SCHEDULE ) - assert self.entity_items == 64 + assert self.entity_items == 65 assert not self.notifications assert self.cooling_present @@ -460,7 +460,7 @@ async def test_connect_anna_loria_heating_idle(self): await self.device_test(smile, "2022-05-16 00:00:01", testdata) assert smile._last_active["15da035090b847e7a21f93e08c015ebc"] == "Winter" - assert self.entity_items == 67 + assert self.entity_items == 68 assert self.cooling_present assert not self._cooling_enabled @@ -528,7 +528,7 @@ async def test_connect_anna_loria_cooling_active(self): await self.device_test(smile, "2022-05-16 00:00:01", testdata) assert smile._last_active["15da035090b847e7a21f93e08c015ebc"] == "Winter" - assert self.entity_items == 67 + assert self.entity_items == 68 assert self.cooling_present assert self._cooling_enabled @@ -551,7 +551,7 @@ async def test_connect_anna_loria_driessens(self): ) await self.device_test(smile, "2022-05-16 00:00:01", testdata) - assert self.entity_items == 67 + assert self.entity_items == 68 assert self.cooling_present assert not self._cooling_enabled diff --git a/tests/test_p1.py b/tests/test_p1.py index ff102ba26..562ebc4fd 100644 --- a/tests/test_p1.py +++ b/tests/test_p1.py @@ -28,7 +28,7 @@ async def test_connect_p1v4_442_single(self): await self.device_test(smile, "2022-05-16 00:00:01", testdata) assert smile.gateway_id == "a455b61e52394b2db5081ce025a430f3" - assert self.entity_items == 32 + assert self.entity_items == 33 assert not self.notifications # Now change some data and change directory reading xml from @@ -78,7 +78,7 @@ async def test_connect_p1v4_442_triple(self): await self.device_test(smile, "2022-05-16 00:00:01", testdata) assert smile.gateway_id == "03e65b16e4b247a29ae0d75a78cb492e" - assert self.entity_items == 41 + assert self.entity_items == 42 assert self.notifications await smile.close_connection() From 05127de938087656c9610ae4eaa9422b0df1bed1 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 19 Jan 2025 17:51:03 +0100 Subject: [PATCH 30/66] Fix for no notifications for legacy --- tests/test_init.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_init.py b/tests/test_init.py index 140ef70e9..ab4ed9457 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -623,7 +623,9 @@ def test_and_assert(test_dict, data, header): _LOGGER.info("Entities list = %s", data) self.cooling_present = smile.cooling_present - self.notifications = data[smile.gateway_id]["notifications"] + self.notifications = None + if "notifications" in data[smile.gateway_id]: + self.notifications = data[smile.gateway_id]["notifications"] self.entity_items = smile.item_count self._cooling_active = False From 29e201da86331712d84c87137ddb1fa71578ad81 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 19 Jan 2025 17:52:41 +0100 Subject: [PATCH 31/66] Save updated fixtures --- fixtures/adam_heatpump_cooling/all_data.json | 1 + fixtures/adam_jip/all_data.json | 1 + fixtures/adam_multiple_devices_per_zone/all_data.json | 5 +++++ fixtures/adam_onoff_cooling_fake_firmware/all_data.json | 1 + fixtures/adam_plus_anna/all_data.json | 5 +++++ fixtures/adam_plus_anna_new/all_data.json | 1 + fixtures/adam_plus_anna_new_regulation_off/all_data.json | 1 + fixtures/adam_zone_per_device/all_data.json | 5 +++++ fixtures/anna_elga_2/all_data.json | 1 + fixtures/anna_elga_2_cooling/all_data.json | 1 + fixtures/anna_elga_2_schedule_off/all_data.json | 1 + fixtures/anna_elga_no_cooling/all_data.json | 1 + fixtures/anna_heatpump_cooling/all_data.json | 1 + fixtures/anna_heatpump_cooling_fake_firmware/all_data.json | 1 + fixtures/anna_heatpump_heating/all_data.json | 1 + fixtures/anna_loria_cooling_active/all_data.json | 1 + fixtures/anna_loria_driessens/all_data.json | 1 + fixtures/anna_loria_heating_idle/all_data.json | 1 + fixtures/anna_v4/all_data.json | 1 + fixtures/anna_v4_dhw/all_data.json | 1 + fixtures/anna_v4_no_tag/all_data.json | 1 + fixtures/anna_without_boiler_fw441/all_data.json | 1 + fixtures/m_adam_cooling/all_data.json | 1 + fixtures/m_adam_heating/all_data.json | 1 + fixtures/m_adam_jip/all_data.json | 1 + fixtures/m_adam_multiple_devices_per_zone/all_data.json | 5 +++++ fixtures/m_anna_heatpump_cooling/all_data.json | 1 + fixtures/m_anna_heatpump_idle/all_data.json | 1 + fixtures/p1v4_442_single/all_data.json | 1 + fixtures/p1v4_442_triple/all_data.json | 5 +++++ 30 files changed, 50 insertions(+) diff --git a/fixtures/adam_heatpump_cooling/all_data.json b/fixtures/adam_heatpump_cooling/all_data.json index 0dd1354b8..f2c18acdb 100644 --- a/fixtures/adam_heatpump_cooling/all_data.json +++ b/fixtures/adam_heatpump_cooling/all_data.json @@ -296,6 +296,7 @@ "model": "Gateway", "model_id": "smile_open_therm", "name": "Adam", + "notifications": {}, "regulation_modes": [ "heating", "off", diff --git a/fixtures/adam_jip/all_data.json b/fixtures/adam_jip/all_data.json index de043a536..2f1e40bb7 100644 --- a/fixtures/adam_jip/all_data.json +++ b/fixtures/adam_jip/all_data.json @@ -226,6 +226,7 @@ "model": "Gateway", "model_id": "smile_open_therm", "name": "Adam", + "notifications": {}, "regulation_modes": ["heating", "off", "bleeding_cold", "bleeding_hot"], "select_gateway_mode": "full", "select_regulation_mode": "heating", diff --git a/fixtures/adam_multiple_devices_per_zone/all_data.json b/fixtures/adam_multiple_devices_per_zone/all_data.json index 523f9cfcc..8487efd70 100644 --- a/fixtures/adam_multiple_devices_per_zone/all_data.json +++ b/fixtures/adam_multiple_devices_per_zone/all_data.json @@ -579,6 +579,11 @@ "model": "Gateway", "model_id": "smile_open_therm", "name": "Adam", + "notifications": { + "af82e4ccf9c548528166d38e560662a4": { + "warning": "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device." + } + }, "select_regulation_mode": "heating", "sensors": { "outdoor_temperature": 7.81 diff --git a/fixtures/adam_onoff_cooling_fake_firmware/all_data.json b/fixtures/adam_onoff_cooling_fake_firmware/all_data.json index cc357e66e..218667b1e 100644 --- a/fixtures/adam_onoff_cooling_fake_firmware/all_data.json +++ b/fixtures/adam_onoff_cooling_fake_firmware/all_data.json @@ -50,6 +50,7 @@ "model": "Gateway", "model_id": "smile_open_therm", "name": "Adam", + "notifications": {}, "regulation_modes": [ "heating", "off", diff --git a/fixtures/adam_plus_anna/all_data.json b/fixtures/adam_plus_anna/all_data.json index bf471305e..989c0e948 100644 --- a/fixtures/adam_plus_anna/all_data.json +++ b/fixtures/adam_plus_anna/all_data.json @@ -85,6 +85,11 @@ "model": "Gateway", "model_id": "smile_open_therm", "name": "Adam", + "notifications": { + "6fb89e35caeb4b1cb275184895202d84": { + "error": "There is no OpenTherm communication with the boiler." + } + }, "select_regulation_mode": "heating", "sensors": { "outdoor_temperature": 11.9 diff --git a/fixtures/adam_plus_anna_new/all_data.json b/fixtures/adam_plus_anna_new/all_data.json index f189f2c0f..c060c8082 100644 --- a/fixtures/adam_plus_anna_new/all_data.json +++ b/fixtures/adam_plus_anna_new/all_data.json @@ -169,6 +169,7 @@ "model": "Gateway", "model_id": "smile_open_therm", "name": "Adam", + "notifications": {}, "regulation_modes": ["bleeding_hot", "bleeding_cold", "off", "heating"], "select_gateway_mode": "full", "select_regulation_mode": "heating", diff --git a/fixtures/adam_plus_anna_new_regulation_off/all_data.json b/fixtures/adam_plus_anna_new_regulation_off/all_data.json index db3c33f47..97912d874 100644 --- a/fixtures/adam_plus_anna_new_regulation_off/all_data.json +++ b/fixtures/adam_plus_anna_new_regulation_off/all_data.json @@ -169,6 +169,7 @@ "model": "Gateway", "model_id": "smile_open_therm", "name": "Adam", + "notifications": {}, "regulation_modes": ["bleeding_hot", "bleeding_cold", "off", "heating"], "select_gateway_mode": "full", "select_regulation_mode": "off", diff --git a/fixtures/adam_zone_per_device/all_data.json b/fixtures/adam_zone_per_device/all_data.json index b16d8807c..ae2f75370 100644 --- a/fixtures/adam_zone_per_device/all_data.json +++ b/fixtures/adam_zone_per_device/all_data.json @@ -576,6 +576,11 @@ "model": "Gateway", "model_id": "smile_open_therm", "name": "Adam", + "notifications": { + "af82e4ccf9c548528166d38e560662a4": { + "warning": "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device." + } + }, "select_regulation_mode": "heating", "sensors": { "outdoor_temperature": 7.69 diff --git a/fixtures/anna_elga_2/all_data.json b/fixtures/anna_elga_2/all_data.json index e7a3b244b..30e96f68a 100644 --- a/fixtures/anna_elga_2/all_data.json +++ b/fixtures/anna_elga_2/all_data.json @@ -77,6 +77,7 @@ "model": "Gateway", "model_id": "smile_thermo", "name": "Smile Anna", + "notifications": {}, "sensors": { "outdoor_temperature": 6.38 }, diff --git a/fixtures/anna_elga_2_cooling/all_data.json b/fixtures/anna_elga_2_cooling/all_data.json index 064248808..fe46b6d0a 100644 --- a/fixtures/anna_elga_2_cooling/all_data.json +++ b/fixtures/anna_elga_2_cooling/all_data.json @@ -83,6 +83,7 @@ "model": "Gateway", "model_id": "smile_thermo", "name": "Smile Anna", + "notifications": {}, "sensors": { "outdoor_temperature": 31.0 }, diff --git a/fixtures/anna_elga_2_schedule_off/all_data.json b/fixtures/anna_elga_2_schedule_off/all_data.json index 132c3bcb0..4876a4416 100644 --- a/fixtures/anna_elga_2_schedule_off/all_data.json +++ b/fixtures/anna_elga_2_schedule_off/all_data.json @@ -83,6 +83,7 @@ "model": "Gateway", "model_id": "smile_thermo", "name": "Smile Anna", + "notifications": {}, "sensors": { "outdoor_temperature": 13.0 }, diff --git a/fixtures/anna_elga_no_cooling/all_data.json b/fixtures/anna_elga_no_cooling/all_data.json index 2abfc6c21..aa775140f 100644 --- a/fixtures/anna_elga_no_cooling/all_data.json +++ b/fixtures/anna_elga_no_cooling/all_data.json @@ -12,6 +12,7 @@ "model": "Gateway", "model_id": "smile_thermo", "name": "Smile Anna", + "notifications": {}, "sensors": { "outdoor_temperature": 20.2 }, diff --git a/fixtures/anna_heatpump_cooling/all_data.json b/fixtures/anna_heatpump_cooling/all_data.json index 1cb97ff31..80cf40202 100644 --- a/fixtures/anna_heatpump_cooling/all_data.json +++ b/fixtures/anna_heatpump_cooling/all_data.json @@ -12,6 +12,7 @@ "model": "Gateway", "model_id": "smile_thermo", "name": "Smile Anna", + "notifications": {}, "sensors": { "outdoor_temperature": 22.0 }, diff --git a/fixtures/anna_heatpump_cooling_fake_firmware/all_data.json b/fixtures/anna_heatpump_cooling_fake_firmware/all_data.json index ecbb51ef3..b80a30493 100644 --- a/fixtures/anna_heatpump_cooling_fake_firmware/all_data.json +++ b/fixtures/anna_heatpump_cooling_fake_firmware/all_data.json @@ -12,6 +12,7 @@ "model": "Gateway", "model_id": "smile_thermo", "name": "Smile Anna", + "notifications": {}, "sensors": { "outdoor_temperature": 22.0 }, diff --git a/fixtures/anna_heatpump_heating/all_data.json b/fixtures/anna_heatpump_heating/all_data.json index 283ad7c98..8fc5771b6 100644 --- a/fixtures/anna_heatpump_heating/all_data.json +++ b/fixtures/anna_heatpump_heating/all_data.json @@ -12,6 +12,7 @@ "model": "Gateway", "model_id": "smile_thermo", "name": "Smile Anna", + "notifications": {}, "sensors": { "outdoor_temperature": 20.2 }, diff --git a/fixtures/anna_loria_cooling_active/all_data.json b/fixtures/anna_loria_cooling_active/all_data.json index aabfa8f80..bd46b01b6 100644 --- a/fixtures/anna_loria_cooling_active/all_data.json +++ b/fixtures/anna_loria_cooling_active/all_data.json @@ -46,6 +46,7 @@ "model": "Gateway", "model_id": "smile_thermo", "name": "Smile Anna", + "notifications": {}, "sensors": { "outdoor_temperature": 15.5 }, diff --git a/fixtures/anna_loria_driessens/all_data.json b/fixtures/anna_loria_driessens/all_data.json index 34cf37733..54f6d0fb7 100644 --- a/fixtures/anna_loria_driessens/all_data.json +++ b/fixtures/anna_loria_driessens/all_data.json @@ -12,6 +12,7 @@ "model": "Gateway", "model_id": "smile_thermo", "name": "Smile Anna", + "notifications": {}, "sensors": { "outdoor_temperature": 6.81 }, diff --git a/fixtures/anna_loria_heating_idle/all_data.json b/fixtures/anna_loria_heating_idle/all_data.json index 2790624f6..8eaee922f 100644 --- a/fixtures/anna_loria_heating_idle/all_data.json +++ b/fixtures/anna_loria_heating_idle/all_data.json @@ -46,6 +46,7 @@ "model": "Gateway", "model_id": "smile_thermo", "name": "Smile Anna", + "notifications": {}, "sensors": { "outdoor_temperature": 15.5 }, diff --git a/fixtures/anna_v4/all_data.json b/fixtures/anna_v4/all_data.json index bcda4c000..8cd59b72e 100644 --- a/fixtures/anna_v4/all_data.json +++ b/fixtures/anna_v4/all_data.json @@ -44,6 +44,7 @@ "model": "Gateway", "model_id": "smile_thermo", "name": "Smile Anna", + "notifications": {}, "sensors": { "outdoor_temperature": 7.44 }, diff --git a/fixtures/anna_v4_dhw/all_data.json b/fixtures/anna_v4_dhw/all_data.json index 783fdf1f8..08488701c 100644 --- a/fixtures/anna_v4_dhw/all_data.json +++ b/fixtures/anna_v4_dhw/all_data.json @@ -44,6 +44,7 @@ "model": "Gateway", "model_id": "smile_thermo", "name": "Smile Anna", + "notifications": {}, "sensors": { "outdoor_temperature": 7.44 }, diff --git a/fixtures/anna_v4_no_tag/all_data.json b/fixtures/anna_v4_no_tag/all_data.json index 37da0174e..7a4a80705 100644 --- a/fixtures/anna_v4_no_tag/all_data.json +++ b/fixtures/anna_v4_no_tag/all_data.json @@ -44,6 +44,7 @@ "model": "Gateway", "model_id": "smile_thermo", "name": "Smile Anna", + "notifications": {}, "sensors": { "outdoor_temperature": 7.44 }, diff --git a/fixtures/anna_without_boiler_fw441/all_data.json b/fixtures/anna_without_boiler_fw441/all_data.json index ebd3a07ad..89d3dc41e 100644 --- a/fixtures/anna_without_boiler_fw441/all_data.json +++ b/fixtures/anna_without_boiler_fw441/all_data.json @@ -44,6 +44,7 @@ "model": "Gateway", "model_id": "smile_thermo", "name": "Smile Anna", + "notifications": {}, "sensors": { "outdoor_temperature": 8.31 }, diff --git a/fixtures/m_adam_cooling/all_data.json b/fixtures/m_adam_cooling/all_data.json index f862f5ca2..ad44fce98 100644 --- a/fixtures/m_adam_cooling/all_data.json +++ b/fixtures/m_adam_cooling/all_data.json @@ -80,6 +80,7 @@ "model": "Gateway", "model_id": "smile_open_therm", "name": "Adam", + "notifications": {}, "regulation_modes": [ "bleeding_hot", "bleeding_cold", diff --git a/fixtures/m_adam_heating/all_data.json b/fixtures/m_adam_heating/all_data.json index 7ae58aa8d..27659f013 100644 --- a/fixtures/m_adam_heating/all_data.json +++ b/fixtures/m_adam_heating/all_data.json @@ -85,6 +85,7 @@ "model": "Gateway", "model_id": "smile_open_therm", "name": "Adam", + "notifications": {}, "regulation_modes": ["bleeding_hot", "bleeding_cold", "off", "heating"], "select_gateway_mode": "full", "select_regulation_mode": "heating", diff --git a/fixtures/m_adam_jip/all_data.json b/fixtures/m_adam_jip/all_data.json index 1b87955ad..065e07e28 100644 --- a/fixtures/m_adam_jip/all_data.json +++ b/fixtures/m_adam_jip/all_data.json @@ -225,6 +225,7 @@ "model": "Gateway", "model_id": "smile_open_therm", "name": "Adam", + "notifications": {}, "regulation_modes": ["heating", "off", "bleeding_cold", "bleeding_hot"], "select_gateway_mode": "full", "select_regulation_mode": "heating", diff --git a/fixtures/m_adam_multiple_devices_per_zone/all_data.json b/fixtures/m_adam_multiple_devices_per_zone/all_data.json index 420f6c874..08788aa1c 100644 --- a/fixtures/m_adam_multiple_devices_per_zone/all_data.json +++ b/fixtures/m_adam_multiple_devices_per_zone/all_data.json @@ -570,6 +570,11 @@ "model": "Gateway", "model_id": "smile_open_therm", "name": "Adam", + "notifications": { + "af82e4ccf9c548528166d38e560662a4": { + "warning": "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device." + } + }, "select_regulation_mode": "heating", "sensors": { "outdoor_temperature": 7.81 diff --git a/fixtures/m_anna_heatpump_cooling/all_data.json b/fixtures/m_anna_heatpump_cooling/all_data.json index deaf93067..4f969c2c0 100644 --- a/fixtures/m_anna_heatpump_cooling/all_data.json +++ b/fixtures/m_anna_heatpump_cooling/all_data.json @@ -12,6 +12,7 @@ "model": "Gateway", "model_id": "smile_thermo", "name": "Smile Anna", + "notifications": {}, "sensors": { "outdoor_temperature": 28.2 }, diff --git a/fixtures/m_anna_heatpump_idle/all_data.json b/fixtures/m_anna_heatpump_idle/all_data.json index 503fc06b8..52c12a093 100644 --- a/fixtures/m_anna_heatpump_idle/all_data.json +++ b/fixtures/m_anna_heatpump_idle/all_data.json @@ -12,6 +12,7 @@ "model": "Gateway", "model_id": "smile_thermo", "name": "Smile Anna", + "notifications": {}, "sensors": { "outdoor_temperature": 28.2 }, diff --git a/fixtures/p1v4_442_single/all_data.json b/fixtures/p1v4_442_single/all_data.json index bd4397c85..b98202b42 100644 --- a/fixtures/p1v4_442_single/all_data.json +++ b/fixtures/p1v4_442_single/all_data.json @@ -12,6 +12,7 @@ "model": "Gateway", "model_id": "smile", "name": "Smile P1", + "notifications": {}, "vendor": "Plugwise" }, "ba4de7613517478da82dd9b6abea36af": { diff --git a/fixtures/p1v4_442_triple/all_data.json b/fixtures/p1v4_442_triple/all_data.json index f455c5bad..62d4def33 100644 --- a/fixtures/p1v4_442_triple/all_data.json +++ b/fixtures/p1v4_442_triple/all_data.json @@ -12,6 +12,11 @@ "model": "Gateway", "model_id": "smile", "name": "Smile P1", + "notifications": { + "97a04c0c263049b29350a660b4cdd01e": { + "warning": "The Smile P1 is not connected to a smart meter." + } + }, "vendor": "Plugwise" }, "b82b6b3322484f2ea4e25e0bd5f3d61f": { From 6bf50d27a8f4fc1dc415c8db61a39bf391ed3360 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 19 Jan 2025 17:53:02 +0100 Subject: [PATCH 32/66] Bump to a3 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 976eadea2..5d97e9a9a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plugwise" -version = "1.7.0a2" +version = "1.7.0a3" license = {file = "LICENSE"} description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3." readme = "README.md" From 5e1e52afb180721dd111e723f2b4fba5887a3a21 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 20 Jan 2025 11:53:09 +0100 Subject: [PATCH 33/66] Simplify fixtures and filenames --- tests/test_init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_init.py b/tests/test_init.py index ab4ed9457..429635cae 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -642,7 +642,7 @@ def test_and_assert(test_dict, data, header): "cooling_state" ] - self._write_json("all_data", {"devices": data}) + self._write_json("data", data) if "FIXTURES" in os.environ: _LOGGER.info("Skipping tests: Requested fixtures only") # pragma: no cover From d14c25351e7a20b8591fa64cc311514d1b2b014b Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 20 Jan 2025 19:02:30 +0100 Subject: [PATCH 34/66] Save updated fixtures --- fixtures/adam_heatpump_cooling/data.json | 807 ++++++++++++++++++ fixtures/adam_jip/data.json | 371 ++++++++ .../adam_multiple_devices_per_zone/data.json | 593 +++++++++++++ .../data.json | 112 +++ fixtures/adam_plus_anna/data.json | 130 +++ fixtures/adam_plus_anna_new/data.json | 286 +++++++ .../data.json | 286 +++++++ fixtures/adam_zone_per_device/data.json | 590 +++++++++++++ fixtures/anna_elga_2/data.json | 85 ++ fixtures/anna_elga_2_cooling/data.json | 91 ++ fixtures/anna_elga_2_schedule_off/data.json | 91 ++ fixtures/anna_elga_no_cooling/data.json | 93 ++ fixtures/anna_heatpump_cooling/data.json | 92 ++ .../data.json | 92 ++ fixtures/anna_heatpump_heating/data.json | 97 +++ fixtures/anna_loria_cooling_active/data.json | 96 +++ fixtures/anna_loria_driessens/data.json | 102 +++ fixtures/anna_loria_heating_idle/data.json | 96 +++ fixtures/anna_v4/data.json | 88 ++ fixtures/anna_v4_dhw/data.json | 88 ++ fixtures/anna_v4_no_tag/data.json | 88 ++ fixtures/anna_without_boiler_fw441/data.json | 61 ++ fixtures/legacy_anna/data.json | 60 ++ fixtures/legacy_anna_2/data.json | 64 ++ fixtures/p1v4_442_single/data.json | 43 + fixtures/p1v4_442_triple/data.json | 56 ++ fixtures/smile_p1_v2/data.json | 34 + fixtures/smile_p1_v2_2/data.json | 34 + fixtures/stretch_v23/data.json | 354 ++++++++ fixtures/stretch_v27_no_domain/data.json | 272 ++++++ fixtures/stretch_v31/data.json | 136 +++ 31 files changed, 5488 insertions(+) create mode 100644 fixtures/adam_heatpump_cooling/data.json create mode 100644 fixtures/adam_jip/data.json create mode 100644 fixtures/adam_multiple_devices_per_zone/data.json create mode 100644 fixtures/adam_onoff_cooling_fake_firmware/data.json create mode 100644 fixtures/adam_plus_anna/data.json create mode 100644 fixtures/adam_plus_anna_new/data.json create mode 100644 fixtures/adam_plus_anna_new_regulation_off/data.json create mode 100644 fixtures/adam_zone_per_device/data.json create mode 100644 fixtures/anna_elga_2/data.json create mode 100644 fixtures/anna_elga_2_cooling/data.json create mode 100644 fixtures/anna_elga_2_schedule_off/data.json create mode 100644 fixtures/anna_elga_no_cooling/data.json create mode 100644 fixtures/anna_heatpump_cooling/data.json create mode 100644 fixtures/anna_heatpump_cooling_fake_firmware/data.json create mode 100644 fixtures/anna_heatpump_heating/data.json create mode 100644 fixtures/anna_loria_cooling_active/data.json create mode 100644 fixtures/anna_loria_driessens/data.json create mode 100644 fixtures/anna_loria_heating_idle/data.json create mode 100644 fixtures/anna_v4/data.json create mode 100644 fixtures/anna_v4_dhw/data.json create mode 100644 fixtures/anna_v4_no_tag/data.json create mode 100644 fixtures/anna_without_boiler_fw441/data.json create mode 100644 fixtures/legacy_anna/data.json create mode 100644 fixtures/legacy_anna_2/data.json create mode 100644 fixtures/p1v4_442_single/data.json create mode 100644 fixtures/p1v4_442_triple/data.json create mode 100644 fixtures/smile_p1_v2/data.json create mode 100644 fixtures/smile_p1_v2_2/data.json create mode 100644 fixtures/stretch_v23/data.json create mode 100644 fixtures/stretch_v27_no_domain/data.json create mode 100644 fixtures/stretch_v31/data.json diff --git a/fixtures/adam_heatpump_cooling/data.json b/fixtures/adam_heatpump_cooling/data.json new file mode 100644 index 000000000..04b033f2a --- /dev/null +++ b/fixtures/adam_heatpump_cooling/data.json @@ -0,0 +1,807 @@ +{ + "04b15f6e884448288f811d29fb7b1b30": { + "active_preset": "away", + "available_schedules": [ + "Opstaan weekdag", + "Werkdag schema", + "Weekend", + "off" + ], + "climate_mode": "cool", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Slaapkamer SJ", + "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "select_schedule": "off", + "sensors": { + "electricity_consumed": 0.0, + "electricity_produced": 0.0, + "temperature": 22.6 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 20.5, + "upper_bound": 99.9 + }, + "thermostats": { + "primary": ["d3a276aeb3114a509bab1e4bf8c40348"], + "secondary": [] + }, + "vendor": "Plugwise" + }, + "0ca13e8176204ca7bf6f09de59f81c83": { + "available": true, + "binary_sensors": { + "cooling_enabled": true, + "cooling_state": false, + "dhw_state": true, + "flame_state": false, + "heating_state": false + }, + "dev_class": "heater_central", + "location": "eedadcb297564f1483faa509179aebed", + "max_dhw_temperature": { + "lower_bound": 40.0, + "resolution": 0.01, + "setpoint": 60.0, + "upper_bound": 65.0 + }, + "maximum_boiler_temperature": { + "lower_bound": 7.0, + "resolution": 0.01, + "setpoint": 35.0, + "upper_bound": 50.0 + }, + "model": "Generic heater/cooler", + "model_id": "17.1", + "name": "OpenTherm", + "sensors": { + "dhw_temperature": 63.5, + "intended_boiler_temperature": 0.0, + "modulation_level": 0.0, + "outdoor_air_temperature": 13.5, + "return_temperature": 24.9, + "water_pressure": 2.0, + "water_temperature": 24.5 + }, + "switches": { + "dhw_cm_switch": true + }, + "vendor": "Remeha B.V." + }, + "1053c8bbf8be43c6921742b146a625f1": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "zone_thermostat", + "firmware": "2016-10-10T02:00:00+02:00", + "hardware": "255", + "location": "b52908550469425b812c87f766fe5303", + "model": "Lisa", + "model_id": "158-01", + "name": "Thermostaat BK", + "sensors": { + "battery": 55, + "setpoint": 18.0, + "temperature": 18.8 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A17" + }, + "1a27dd03b5454c4e8b9e75c8d1afc7af": { + "available": true, + "dev_class": "valve_actuator_plug", + "firmware": "2020-05-13T02:00:00+02:00", + "location": "20e735858f8146cead98b873177a4f99", + "model": "Plug", + "model_id": "160-01", + "name": "Smart Plug DB", + "sensors": { + "electricity_consumed": 0.0, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "relay": false + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A05" + }, + "20e735858f8146cead98b873177a4f99": { + "active_preset": "away", + "available_schedules": [ + "Opstaan weekdag", + "Werkdag schema", + "Weekend", + "off" + ], + "climate_mode": "cool", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Slaapkamer DB", + "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "select_schedule": "off", + "sensors": { + "electricity_consumed": 0.0, + "electricity_produced": 0.0, + "temperature": 22.0 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 18.0, + "upper_bound": 99.9 + }, + "thermostats": { + "primary": ["47e2c550a33846b680725aa3fb229473"], + "secondary": [] + }, + "vendor": "Plugwise" + }, + "2e0fc4db2a6d4cbeb7cf786143543961": { + "available": true, + "dev_class": "valve_actuator_plug", + "firmware": "2020-05-13T02:00:00+02:00", + "location": "a562019b0b1f47a4bde8ebe3dbe3e8a9", + "model": "Plug", + "model_id": "160-01", + "name": "Smart Plug KK", + "sensors": { + "electricity_consumed": 2.13, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A06" + }, + "3b4d2574e2c9443a832b48d19a1c4f06": { + "available": true, + "dev_class": "valve_actuator_plug", + "firmware": "2020-05-13T02:00:00+02:00", + "location": "04b15f6e884448288f811d29fb7b1b30", + "model": "Plug", + "model_id": "160-01", + "name": "Smart Plug SJ", + "sensors": { + "electricity_consumed": 0.0, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "relay": false + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A14" + }, + "3f0afa71f16c45ab964050002560e43c": { + "available": true, + "dev_class": "valve_actuator_plug", + "firmware": "2020-05-13T02:00:00+02:00", + "location": "fa5fa6b34f6b40a0972988b20e888ed4", + "model": "Plug", + "model_id": "160-01", + "name": "Smart Plug WK", + "sensors": { + "electricity_consumed": 0.0, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "relay": false + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A18" + }, + "47e2c550a33846b680725aa3fb229473": { + "available": true, + "dev_class": "zone_thermostat", + "firmware": "2016-10-10T02:00:00+02:00", + "hardware": "255", + "location": "20e735858f8146cead98b873177a4f99", + "model": "Lisa", + "model_id": "158-01", + "name": "Thermostaat DB", + "sensors": { + "setpoint": 18.0, + "temperature": 22.0 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A20" + }, + "5cc21042f87f4b4c94ccb5537c47a53f": { + "active_preset": "away", + "available_schedules": [ + "Opstaan weekdag", + "Werkdag schema", + "Weekend", + "off" + ], + "climate_mode": "auto", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Badkamer 2", + "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "select_schedule": "Werkdag schema", + "sensors": { + "electricity_consumed": 0.0, + "temperature": 21.9 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 20.5, + "upper_bound": 99.9 + }, + "thermostats": { + "primary": ["f04c985c11ad4848b8fcd710343f9dcf"], + "secondary": [] + }, + "vendor": "Plugwise" + }, + "5ead63c65e5f44e7870ba2bd680ceb9e": { + "available": true, + "dev_class": "valve_actuator_plug", + "firmware": "2020-05-13T02:00:00+02:00", + "location": "9a27714b970547ee9a6bdadc2b815ad5", + "model": "Plug", + "model_id": "160-01", + "name": "Smart Plug SQ", + "sensors": { + "electricity_consumed": 0.0, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "relay": false + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A15" + }, + "7d97fc3117784cfdafe347bcedcbbbcb": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "3.2.8", + "gateway_modes": ["away", "full", "vacation"], + "hardware": "AME Smile 2.0 board", + "location": "eedadcb297564f1483faa509179aebed", + "mac_address": "012345670001", + "model": "Gateway", + "model_id": "smile_open_therm", + "name": "Adam", + "notifications": {}, + "regulation_modes": [ + "heating", + "off", + "bleeding_cold", + "bleeding_hot", + "cooling" + ], + "select_gateway_mode": "full", + "select_regulation_mode": "cooling", + "sensors": { + "outdoor_temperature": 13.4 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670101" + }, + "7fda9f84f01342f8afe9ebbbbff30c0f": { + "available": true, + "dev_class": "zone_thermostat", + "firmware": "2016-10-10T02:00:00+02:00", + "hardware": "255", + "location": "e39529c79ab54fda9bed26cfc0447546", + "model": "Lisa", + "model_id": "158-01", + "name": "Thermostaat JM", + "sensors": { + "setpoint": 18.0, + "temperature": 20.0 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A01" + }, + "838c2f48195242709b87217cf8d8a71f": { + "available": true, + "dev_class": "valve_actuator_plug", + "firmware": "2020-05-13T02:00:00+02:00", + "location": "b52908550469425b812c87f766fe5303", + "model": "Plug", + "model_id": "160-01", + "name": "Smart Plug BK", + "sensors": { + "electricity_consumed": 0.0, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "relay": false + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A12" + }, + "8a482fa9dddb43acb765d019d8c9838b": { + "available": true, + "dev_class": "valve_actuator_plug", + "firmware": "2020-05-13T02:00:00+02:00", + "location": "5cc21042f87f4b4c94ccb5537c47a53f", + "model": "Plug", + "model_id": "160-01", + "name": "Smart Plug BK2", + "sensors": { + "electricity_consumed": 0.0, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "relay": false + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A10" + }, + "8cf650a4c10c44819e426bed406aec34": { + "active_preset": "away", + "available_schedules": [ + "Opstaan weekdag", + "Werkdag schema", + "Weekend", + "off" + ], + "climate_mode": "auto", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Badkamer 1", + "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "select_schedule": "Werkdag schema", + "sensors": { + "electricity_consumed": 0.0, + "electricity_produced": 0.0, + "temperature": 21.5 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 20.5, + "upper_bound": 99.9 + }, + "thermostats": { + "primary": ["eac5db95d97241f6b17790897847ccf5"], + "secondary": [] + }, + "vendor": "Plugwise" + }, + "93ac3f7bf25342f58cbb77c4a99ac0b3": { + "active_preset": "away", + "available_schedules": [ + "Opstaan weekdag", + "Werkdag schema", + "Weekend", + "off" + ], + "climate_mode": "cool", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Slaapkamer RB", + "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "select_schedule": "off", + "sensors": { + "electricity_consumed": 3.13, + "temperature": 20.7 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 17.0, + "upper_bound": 99.9 + }, + "thermostats": { + "primary": ["c4ed311d54e341f58b4cdd201d1fde7e"], + "secondary": [] + }, + "vendor": "Plugwise" + }, + "96714ad90fc948bcbcb5021c4b9f5ae9": { + "available": true, + "dev_class": "valve_actuator_plug", + "firmware": "2020-05-13T02:00:00+02:00", + "location": "e39529c79ab54fda9bed26cfc0447546", + "model": "Plug", + "model_id": "160-01", + "name": "Smart Plug JM", + "sensors": { + "electricity_consumed": 0.0, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "relay": false + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A03" + }, + "9a27714b970547ee9a6bdadc2b815ad5": { + "active_preset": "away", + "available_schedules": [ + "Opstaan weekdag", + "Werkdag schema", + "Weekend", + "off" + ], + "climate_mode": "cool", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Slaapkamer SQ", + "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "select_schedule": "off", + "sensors": { + "electricity_consumed": 0.0, + "electricity_produced": 0.0, + "temperature": 21.4 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 18.5, + "upper_bound": 99.9 + }, + "thermostats": { + "primary": ["beb32da072274e698146db8b022f3c36"], + "secondary": [] + }, + "vendor": "Plugwise" + }, + "a03b6e8e76dd4646af1a77c31dd9370c": { + "available": true, + "dev_class": "valve_actuator_plug", + "firmware": "2020-05-13T02:00:00+02:00", + "location": "93ac3f7bf25342f58cbb77c4a99ac0b3", + "model": "Plug", + "model_id": "160-01", + "name": "Smart Plug RB", + "sensors": { + "electricity_consumed": 3.13, + "electricity_consumed_interval": 0.77, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "relay": false + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A08" + }, + "a562019b0b1f47a4bde8ebe3dbe3e8a9": { + "active_preset": "away", + "available_schedules": [ + "Opstaan weekdag", + "Werkdag schema", + "Weekend", + "off" + ], + "climate_mode": "auto", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Keuken", + "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "select_schedule": "Werkdag schema", + "sensors": { + "electricity_consumed": 2.13, + "electricity_produced": 0.0, + "temperature": 22.5 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 21.5, + "upper_bound": 99.9 + }, + "thermostats": { + "primary": ["ea8372c0e3ad4622ad45a041d02425f5"], + "secondary": [] + }, + "vendor": "Plugwise" + }, + "b52908550469425b812c87f766fe5303": { + "active_preset": "away", + "available_schedules": [ + "Opstaan weekdag", + "Werkdag schema", + "Weekend", + "off" + ], + "climate_mode": "cool", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Bijkeuken", + "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "select_schedule": "off", + "sensors": { + "electricity_consumed": 0.0, + "electricity_produced": 0.0, + "temperature": 18.8 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 18.0, + "upper_bound": 99.9 + }, + "thermostats": { + "primary": ["1053c8bbf8be43c6921742b146a625f1"], + "secondary": [] + }, + "vendor": "Plugwise" + }, + "bbcffa48019f4b09b8368bbaf9559e68": { + "available": true, + "dev_class": "valve_actuator_plug", + "firmware": "2020-05-13T02:00:00+02:00", + "location": "8cf650a4c10c44819e426bed406aec34", + "model": "Plug", + "model_id": "160-01", + "name": "Smart Plug BK1", + "sensors": { + "electricity_consumed": 0.0, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "relay": false + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A16" + }, + "beb32da072274e698146db8b022f3c36": { + "available": true, + "dev_class": "zone_thermostat", + "firmware": "2016-10-10T02:00:00+02:00", + "hardware": "255", + "location": "9a27714b970547ee9a6bdadc2b815ad5", + "model": "Lisa", + "model_id": "158-01", + "name": "Thermostaat SQ", + "sensors": { + "setpoint": 18.5, + "temperature": 21.4 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A07" + }, + "c4ed311d54e341f58b4cdd201d1fde7e": { + "available": true, + "dev_class": "zone_thermostat", + "firmware": "2016-10-10T02:00:00+02:00", + "hardware": "255", + "location": "93ac3f7bf25342f58cbb77c4a99ac0b3", + "model": "Lisa", + "model_id": "158-01", + "name": "Thermostaat RB", + "sensors": { + "setpoint": 17.0, + "temperature": 20.7 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A04" + }, + "ca79d23ae0094120b877558734cff85c": { + "dev_class": "thermostat", + "location": "fa5fa6b34f6b40a0972988b20e888ed4", + "model": "ThermoTouch", + "model_id": "143.1", + "name": "Thermostaat WK", + "sensors": { + "setpoint": 21.5, + "temperature": 22.5 + }, + "vendor": "Plugwise" + }, + "d3a276aeb3114a509bab1e4bf8c40348": { + "available": true, + "dev_class": "zone_thermostat", + "firmware": "2016-10-10T02:00:00+02:00", + "hardware": "255", + "location": "04b15f6e884448288f811d29fb7b1b30", + "model": "Lisa", + "model_id": "158-01", + "name": "Thermostaat SJ", + "sensors": { + "setpoint": 20.5, + "temperature": 22.6 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A13" + }, + "e39529c79ab54fda9bed26cfc0447546": { + "active_preset": "away", + "available_schedules": [ + "Opstaan weekdag", + "Werkdag schema", + "Weekend", + "off" + ], + "climate_mode": "cool", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Slaapkamer JM", + "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "select_schedule": "off", + "sensors": { + "electricity_consumed": 0.0, + "electricity_produced": 0.0, + "temperature": 20.0 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 18.0, + "upper_bound": 99.9 + }, + "thermostats": { + "primary": ["7fda9f84f01342f8afe9ebbbbff30c0f"], + "secondary": [] + }, + "vendor": "Plugwise" + }, + "ea8372c0e3ad4622ad45a041d02425f5": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "zone_thermostat", + "firmware": "2016-10-10T02:00:00+02:00", + "hardware": "255", + "location": "a562019b0b1f47a4bde8ebe3dbe3e8a9", + "model": "Lisa", + "model_id": "158-01", + "name": "Thermostaat KK", + "sensors": { + "battery": 53, + "setpoint": 21.5, + "temperature": 22.5 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A02" + }, + "eac5db95d97241f6b17790897847ccf5": { + "available": true, + "dev_class": "zone_thermostat", + "firmware": "2016-10-10T02:00:00+02:00", + "hardware": "255", + "location": "8cf650a4c10c44819e426bed406aec34", + "model": "Lisa", + "model_id": "158-01", + "name": "Thermostaat BK1", + "sensors": { + "setpoint": 20.5, + "temperature": 21.5 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A09" + }, + "f04c985c11ad4848b8fcd710343f9dcf": { + "available": true, + "dev_class": "zone_thermostat", + "firmware": "2016-10-10T02:00:00+02:00", + "hardware": "255", + "location": "5cc21042f87f4b4c94ccb5537c47a53f", + "model": "Lisa", + "model_id": "158-01", + "name": "Thermostaat BK2", + "sensors": { + "setpoint": 20.5, + "temperature": 21.9 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A11" + }, + "fa5fa6b34f6b40a0972988b20e888ed4": { + "active_preset": "away", + "available_schedules": [ + "Opstaan weekdag", + "Werkdag schema", + "Weekend", + "off" + ], + "climate_mode": "auto", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Woonkamer", + "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "select_schedule": "Werkdag schema", + "sensors": { + "electricity_consumed": 0.0, + "electricity_produced": 0.0, + "temperature": 22.5 + }, + "thermostat": { + "lower_bound": 1.0, + "resolution": 0.01, + "setpoint": 21.5, + "upper_bound": 35.0 + }, + "thermostats": { + "primary": ["ca79d23ae0094120b877558734cff85c"], + "secondary": [] + }, + "vendor": "Plugwise" + } +} diff --git a/fixtures/adam_jip/data.json b/fixtures/adam_jip/data.json new file mode 100644 index 000000000..ba23d9418 --- /dev/null +++ b/fixtures/adam_jip/data.json @@ -0,0 +1,371 @@ +{ + "06aecb3d00354375924f50c47af36bd2": { + "active_preset": "no_frost", + "climate_mode": "heat", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Slaapkamer", + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "sensors": { + "temperature": 24.2 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 13.0, + "upper_bound": 99.9 + }, + "thermostats": { + "primary": ["1346fbd8498d4dbcab7e18d51b771f3d"], + "secondary": ["356b65335e274d769c338223e7af9c33"] + }, + "vendor": "Plugwise" + }, + "13228dab8ce04617af318a2888b3c548": { + "active_preset": "home", + "climate_mode": "heat", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Woonkamer", + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "sensors": { + "temperature": 27.4 + }, + "thermostat": { + "lower_bound": 4.0, + "resolution": 0.01, + "setpoint": 9.0, + "upper_bound": 30.0 + }, + "thermostats": { + "primary": ["f61f1a2535f54f52ad006a3d18e459ca"], + "secondary": ["833de10f269c4deab58fb9df69901b4e"] + }, + "vendor": "Plugwise" + }, + "1346fbd8498d4dbcab7e18d51b771f3d": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "zone_thermostat", + "firmware": "2016-10-27T02:00:00+02:00", + "hardware": "255", + "location": "06aecb3d00354375924f50c47af36bd2", + "model": "Lisa", + "model_id": "158-01", + "name": "Slaapkamer", + "sensors": { + "battery": 92, + "setpoint": 13.0, + "temperature": 24.2 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A03" + }, + "1da4d325838e4ad8aac12177214505c9": { + "available": true, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2020-11-04T01:00:00+01:00", + "hardware": "1", + "location": "d58fec52899f4f1c92e4f8fad6d8c48c", + "model": "Tom/Floor", + "model_id": "106-03", + "name": "Tom Logeerkamer", + "sensors": { + "setpoint": 13.0, + "temperature": 28.8, + "temperature_difference": 2.0, + "valve_position": 0.0 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.1, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A07" + }, + "356b65335e274d769c338223e7af9c33": { + "available": true, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2020-11-04T01:00:00+01:00", + "hardware": "1", + "location": "06aecb3d00354375924f50c47af36bd2", + "model": "Tom/Floor", + "model_id": "106-03", + "name": "Tom Slaapkamer", + "sensors": { + "setpoint": 13.0, + "temperature": 24.2, + "temperature_difference": 1.7, + "valve_position": 0.0 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.1, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A05" + }, + "457ce8414de24596a2d5e7dbc9c7682f": { + "available": true, + "dev_class": "zz_misc_plug", + "location": "9e4433a9d69f40b3aefd15e74395eaec", + "model": "Aqara Smart Plug", + "model_id": "lumi.plug.maeu01", + "name": "Plug", + "sensors": { + "electricity_consumed_interval": 0.0 + }, + "switches": { + "lock": true, + "relay": false + }, + "vendor": "LUMI", + "zigbee_mac_address": "ABCD012345670A06" + }, + "6f3e9d7084214c21b9dfa46f6eeb8700": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "zone_thermostat", + "firmware": "2016-10-27T02:00:00+02:00", + "hardware": "255", + "location": "d27aede973b54be484f6842d1b2802ad", + "model": "Lisa", + "model_id": "158-01", + "name": "Kinderkamer", + "sensors": { + "battery": 79, + "setpoint": 13.0, + "temperature": 30.0 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A02" + }, + "833de10f269c4deab58fb9df69901b4e": { + "available": true, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2020-11-04T01:00:00+01:00", + "hardware": "1", + "location": "13228dab8ce04617af318a2888b3c548", + "model": "Tom/Floor", + "model_id": "106-03", + "name": "Tom Woonkamer", + "sensors": { + "setpoint": 9.0, + "temperature": 24.0, + "temperature_difference": 1.8, + "valve_position": 100 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.1, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A09" + }, + "a6abc6a129ee499c88a4d420cc413b47": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "zone_thermostat", + "firmware": "2016-10-27T02:00:00+02:00", + "hardware": "255", + "location": "d58fec52899f4f1c92e4f8fad6d8c48c", + "model": "Lisa", + "model_id": "158-01", + "name": "Logeerkamer", + "sensors": { + "battery": 80, + "setpoint": 13.0, + "temperature": 30.0 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A01" + }, + "b5c2386c6f6342669e50fe49dd05b188": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "3.2.8", + "gateway_modes": ["away", "full", "vacation"], + "hardware": "AME Smile 2.0 board", + "location": "9e4433a9d69f40b3aefd15e74395eaec", + "mac_address": "012345670001", + "model": "Gateway", + "model_id": "smile_open_therm", + "name": "Adam", + "notifications": {}, + "regulation_modes": ["heating", "off", "bleeding_cold", "bleeding_hot"], + "select_gateway_mode": "full", + "select_regulation_mode": "heating", + "sensors": { + "outdoor_temperature": 24.9 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670101" + }, + "d27aede973b54be484f6842d1b2802ad": { + "active_preset": "home", + "climate_mode": "heat", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Kinderkamer", + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "sensors": { + "temperature": 30.0 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 13.0, + "upper_bound": 99.9 + }, + "thermostats": { + "primary": ["6f3e9d7084214c21b9dfa46f6eeb8700"], + "secondary": ["d4496250d0e942cfa7aea3476e9070d5"] + }, + "vendor": "Plugwise" + }, + "d4496250d0e942cfa7aea3476e9070d5": { + "available": true, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2020-11-04T01:00:00+01:00", + "hardware": "1", + "location": "d27aede973b54be484f6842d1b2802ad", + "model": "Tom/Floor", + "model_id": "106-03", + "name": "Tom Kinderkamer", + "sensors": { + "setpoint": 13.0, + "temperature": 28.7, + "temperature_difference": 1.9, + "valve_position": 0.0 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.1, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A04" + }, + "d58fec52899f4f1c92e4f8fad6d8c48c": { + "active_preset": "home", + "climate_mode": "heat", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Logeerkamer", + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "sensors": { + "temperature": 30.0 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 13.0, + "upper_bound": 99.9 + }, + "thermostats": { + "primary": ["a6abc6a129ee499c88a4d420cc413b47"], + "secondary": ["1da4d325838e4ad8aac12177214505c9"] + }, + "vendor": "Plugwise" + }, + "e4684553153b44afbef2200885f379dc": { + "available": true, + "binary_sensors": { + "dhw_state": false, + "flame_state": false, + "heating_state": false + }, + "dev_class": "heater_central", + "location": "9e4433a9d69f40b3aefd15e74395eaec", + "max_dhw_temperature": { + "lower_bound": 40.0, + "resolution": 0.01, + "setpoint": 60.0, + "upper_bound": 60.0 + }, + "maximum_boiler_temperature": { + "lower_bound": 20.0, + "resolution": 0.01, + "setpoint": 90.0, + "upper_bound": 90.0 + }, + "model": "Generic heater", + "model_id": "10.20", + "name": "OpenTherm", + "sensors": { + "intended_boiler_temperature": 0.0, + "modulation_level": 0.0, + "return_temperature": 37.1, + "water_pressure": 1.4, + "water_temperature": 37.3 + }, + "switches": { + "dhw_cm_switch": false + }, + "vendor": "Remeha B.V." + }, + "f61f1a2535f54f52ad006a3d18e459ca": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "zone_thermometer", + "firmware": "2020-09-01T02:00:00+02:00", + "hardware": "1", + "location": "13228dab8ce04617af318a2888b3c548", + "model": "Jip", + "model_id": "168-01", + "name": "Woonkamer", + "sensors": { + "battery": 100, + "humidity": 56.2, + "setpoint": 9.0, + "temperature": 27.4 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A08" + } +} diff --git a/fixtures/adam_multiple_devices_per_zone/data.json b/fixtures/adam_multiple_devices_per_zone/data.json new file mode 100644 index 000000000..d3e13a175 --- /dev/null +++ b/fixtures/adam_multiple_devices_per_zone/data.json @@ -0,0 +1,593 @@ +{ + "02cf28bfec924855854c544690a609ef": { + "available": true, + "dev_class": "vcr_plug", + "firmware": "2019-06-21T02:00:00+02:00", + "location": "cd143c07248f491493cea0533bc3d669", + "model": "Plug", + "model_id": "160-01", + "name": "NVR", + "sensors": { + "electricity_consumed": 34.0, + "electricity_consumed_interval": 9.15, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": true, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A15" + }, + "08963fec7c53423ca5680aa4cb502c63": { + "active_preset": "away", + "available_schedules": [ + "CV Roan", + "Bios Schema met Film Avond", + "GF7 Woonkamer", + "Badkamer Schema", + "CV Jessie", + "off" + ], + "climate_mode": "auto", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Badkamer", + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "select_schedule": "Badkamer Schema", + "sensors": { + "temperature": 18.9 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 14.0, + "upper_bound": 100.0 + }, + "thermostats": { + "primary": [ + "f1fee6043d3642a9b0a65297455f008e", + "680423ff840043738f42cc7f1ff97a36" + ], + "secondary": [] + }, + "vendor": "Plugwise" + }, + "12493538af164a409c6a1c79e38afe1c": { + "active_preset": "away", + "available_schedules": [ + "CV Roan", + "Bios Schema met Film Avond", + "GF7 Woonkamer", + "Badkamer Schema", + "CV Jessie", + "off" + ], + "climate_mode": "heat", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Bios", + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "select_schedule": "off", + "sensors": { + "electricity_consumed": 0.0, + "electricity_produced": 0.0, + "temperature": 16.5 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 13.0, + "upper_bound": 100.0 + }, + "thermostats": { + "primary": ["df4a4a8169904cdb9c03d61a21f42140"], + "secondary": ["a2c3583e0a6349358998b760cea82d2a"] + }, + "vendor": "Plugwise" + }, + "21f2b542c49845e6bb416884c55778d6": { + "available": true, + "dev_class": "game_console_plug", + "firmware": "2019-06-21T02:00:00+02:00", + "location": "cd143c07248f491493cea0533bc3d669", + "model": "Plug", + "model_id": "160-01", + "name": "Playstation Smart Plug", + "sensors": { + "electricity_consumed": 84.1, + "electricity_consumed_interval": 8.6, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A12" + }, + "446ac08dd04d4eff8ac57489757b7314": { + "active_preset": "no_frost", + "available_schedules": [ + "CV Roan", + "Bios Schema met Film Avond", + "GF7 Woonkamer", + "Badkamer Schema", + "CV Jessie", + "off" + ], + "climate_mode": "heat", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Garage", + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "select_schedule": "off", + "sensors": { + "temperature": 15.6 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 5.5, + "upper_bound": 100.0 + }, + "thermostats": { + "primary": ["e7693eb9582644e5b865dba8d4447cf1"], + "secondary": [] + }, + "vendor": "Plugwise" + }, + "4a810418d5394b3f82727340b91ba740": { + "available": true, + "dev_class": "router_plug", + "firmware": "2019-06-21T02:00:00+02:00", + "location": "cd143c07248f491493cea0533bc3d669", + "model": "Plug", + "model_id": "160-01", + "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_plug", + "firmware": "2019-06-21T02:00:00+02:00", + "location": "cd143c07248f491493cea0533bc3d669", + "model": "Plug", + "model_id": "160-01", + "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, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2019-03-27T01:00:00+01:00", + "hardware": "1", + "location": "08963fec7c53423ca5680aa4cb502c63", + "model": "Tom/Floor", + "model_id": "106-03", + "name": "Thermostatic Radiator Badkamer 1", + "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": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "zone_thermostat", + "firmware": "2016-10-27T02:00:00+02:00", + "hardware": "255", + "location": "82fa13f017d240daa0d0ea1775420f24", + "model": "Lisa", + "model_id": "158-01", + "name": "Zone Thermostat 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 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A03" + }, + "78d1126fc4c743db81b61c20e88342a7": { + "available": true, + "dev_class": "central_heating_pump_plug", + "firmware": "2019-06-21T02:00:00+02:00", + "location": "c50f167537524366a5af7aa3942feb1e", + "model": "Plug", + "model_id": "160-01", + "name": "CV Pomp", + "sensors": { + "electricity_consumed": 35.6, + "electricity_consumed_interval": 7.37, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A05" + }, + "82fa13f017d240daa0d0ea1775420f24": { + "active_preset": "asleep", + "available_schedules": [ + "CV Roan", + "Bios Schema met Film Avond", + "GF7 Woonkamer", + "Badkamer Schema", + "CV Jessie", + "off" + ], + "climate_mode": "auto", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Jessie", + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "select_schedule": "CV Jessie", + "sensors": { + "temperature": 17.2 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 15.0, + "upper_bound": 100.0 + }, + "thermostats": { + "primary": ["6a3bf693d05e48e0b460c815a4fdd09d"], + "secondary": ["d3da73bde12a47d5a6b8f9dad971f2ec"] + }, + "vendor": "Plugwise" + }, + "90986d591dcd426cae3ec3e8111ff730": { + "binary_sensors": { + "heating_state": true + }, + "dev_class": "heater_central", + "location": "1f9dcf83fd4e4b66b72ff787957bfe5d", + "model": "Unknown", + "name": "OnOff", + "sensors": { + "intended_boiler_temperature": 70.0, + "modulation_level": 1, + "water_temperature": 70.0 + } + }, + "a28f588dc4a049a483fd03a30361ad3a": { + "available": true, + "dev_class": "settop_plug", + "firmware": "2019-06-21T02:00:00+02:00", + "location": "cd143c07248f491493cea0533bc3d669", + "model": "Plug", + "model_id": "160-01", + "name": "Fibaro HC2", + "sensors": { + "electricity_consumed": 12.5, + "electricity_consumed_interval": 3.8, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": true, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A13" + }, + "a2c3583e0a6349358998b760cea82d2a": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2019-03-27T01:00:00+01:00", + "hardware": "1", + "location": "12493538af164a409c6a1c79e38afe1c", + "model": "Tom/Floor", + "model_id": "106-03", + "name": "Bios Cv Thermostatic Radiator ", + "sensors": { + "battery": 62, + "setpoint": 13.0, + "temperature": 17.2, + "temperature_difference": -0.2, + "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": "ABCD012345670A09" + }, + "b310b72a0e354bfab43089919b9a88bf": { + "available": true, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2019-03-27T01:00:00+01:00", + "hardware": "1", + "location": "c50f167537524366a5af7aa3942feb1e", + "model": "Tom/Floor", + "model_id": "106-03", + "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": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "zone_thermostat", + "firmware": "2016-08-02T02:00:00+02:00", + "hardware": "255", + "location": "c50f167537524366a5af7aa3942feb1e", + "model": "Lisa", + "model_id": "158-01", + "name": "Zone Lisa WK", + "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 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A07" + }, + "c50f167537524366a5af7aa3942feb1e": { + "active_preset": "home", + "available_schedules": [ + "CV Roan", + "Bios Schema met Film Avond", + "GF7 Woonkamer", + "Badkamer Schema", + "CV Jessie", + "off" + ], + "climate_mode": "auto", + "control_state": "heating", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Woonkamer", + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "select_schedule": "GF7 Woonkamer", + "sensors": { + "electricity_consumed": 35.6, + "electricity_produced": 0.0, + "temperature": 20.9 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 21.5, + "upper_bound": 100.0 + }, + "thermostats": { + "primary": ["b59bcebaf94b499ea7d46e4a66fb62d8"], + "secondary": ["b310b72a0e354bfab43089919b9a88bf"] + }, + "vendor": "Plugwise" + }, + "cd0ddb54ef694e11ac18ed1cbce5dbbd": { + "available": true, + "dev_class": "vcr_plug", + "firmware": "2019-06-21T02:00:00+02:00", + "location": "cd143c07248f491493cea0533bc3d669", + "model": "Plug", + "model_id": "160-01", + "name": "NAS", + "sensors": { + "electricity_consumed": 16.5, + "electricity_consumed_interval": 0.5, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": true, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A14" + }, + "d3da73bde12a47d5a6b8f9dad971f2ec": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2019-03-27T01:00:00+01:00", + "hardware": "1", + "location": "82fa13f017d240daa0d0ea1775420f24", + "model": "Tom/Floor", + "model_id": "106-03", + "name": "Thermostatic Radiator Jessie", + "sensors": { + "battery": 62, + "setpoint": 15.0, + "temperature": 17.1, + "temperature_difference": 0.1, + "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": "ABCD012345670A10" + }, + "df4a4a8169904cdb9c03d61a21f42140": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "zone_thermostat", + "firmware": "2016-10-27T02:00:00+02:00", + "hardware": "255", + "location": "12493538af164a409c6a1c79e38afe1c", + "model": "Lisa", + "model_id": "158-01", + "name": "Zone Lisa Bios", + "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 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A06" + }, + "e7693eb9582644e5b865dba8d4447cf1": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2019-03-27T01:00:00+01:00", + "hardware": "1", + "location": "446ac08dd04d4eff8ac57489757b7314", + "model": "Tom/Floor", + "model_id": "106-03", + "name": "CV Kraan Garage", + "sensors": { + "battery": 68, + "setpoint": 5.5, + "temperature": 15.6, + "temperature_difference": 0.0, + "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": "ABCD012345670A11" + }, + "f1fee6043d3642a9b0a65297455f008e": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2016-10-27T02:00:00+02:00", + "hardware": "255", + "location": "08963fec7c53423ca5680aa4cb502c63", + "model": "Lisa", + "model_id": "158-01", + "name": "Thermostatic Radiator Badkamer 2", + "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 + }, + "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", + "model_id": "smile_open_therm", + "name": "Adam", + "notifications": { + "af82e4ccf9c548528166d38e560662a4": { + "warning": "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device." + } + }, + "select_regulation_mode": "heating", + "sensors": { + "outdoor_temperature": 7.81 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670101" + } +} diff --git a/fixtures/adam_onoff_cooling_fake_firmware/data.json b/fixtures/adam_onoff_cooling_fake_firmware/data.json new file mode 100644 index 000000000..4803aad72 --- /dev/null +++ b/fixtures/adam_onoff_cooling_fake_firmware/data.json @@ -0,0 +1,112 @@ +{ + "0ca13e8176204ca7bf6f09de59f81c83": { + "binary_sensors": { + "cooling_enabled": true, + "cooling_state": true, + "dhw_state": true, + "flame_state": false, + "heating_state": false + }, + "dev_class": "heater_central", + "location": "eedadcb297564f1483faa509179aebed", + "max_dhw_temperature": { + "lower_bound": 40.0, + "resolution": 0.01, + "setpoint": 60.0, + "upper_bound": 65.0 + }, + "maximum_boiler_temperature": { + "lower_bound": 7.0, + "resolution": 0.01, + "setpoint": 35.0, + "upper_bound": 50.0 + }, + "model": "Unknown", + "name": "OnOff", + "sensors": { + "dhw_temperature": 63.5, + "intended_boiler_temperature": 0.0, + "modulation_level": 0.0, + "outdoor_air_temperature": 13.5, + "return_temperature": 24.9, + "water_pressure": 2.0, + "water_temperature": 24.5 + }, + "switches": { + "dhw_cm_switch": true + } + }, + "7d97fc3117784cfdafe347bcedcbbbcb": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "3.2.8", + "gateway_modes": ["away", "full", "vacation"], + "hardware": "AME Smile 2.0 board", + "location": "eedadcb297564f1483faa509179aebed", + "mac_address": "012345670001", + "model": "Gateway", + "model_id": "smile_open_therm", + "name": "Adam", + "notifications": {}, + "regulation_modes": [ + "heating", + "off", + "bleeding_cold", + "bleeding_hot", + "cooling" + ], + "select_gateway_mode": "full", + "select_regulation_mode": "cooling", + "sensors": { + "outdoor_temperature": 13.4 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670101" + }, + "ca79d23ae0094120b877558734cff85c": { + "dev_class": "thermostat", + "location": "fa5fa6b34f6b40a0972988b20e888ed4", + "model": "ThermoTouch", + "model_id": "143.1", + "name": "Thermostaat WK", + "sensors": { + "setpoint": 21.5, + "temperature": 22.5 + }, + "vendor": "Plugwise" + }, + "fa5fa6b34f6b40a0972988b20e888ed4": { + "active_preset": "away", + "available_schedules": [ + "Opstaan weekdag", + "Werkdag schema", + "Weekend", + "off" + ], + "climate_mode": "auto", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Woonkamer", + "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], + "select_schedule": "Werkdag schema", + "sensors": { + "electricity_consumed": 0.0, + "electricity_produced": 0.0, + "temperature": 22.5 + }, + "thermostat": { + "lower_bound": 1.0, + "resolution": 0.01, + "setpoint": 21.5, + "upper_bound": 35.0 + }, + "thermostats": { + "primary": ["ca79d23ae0094120b877558734cff85c"], + "secondary": [] + }, + "vendor": "Plugwise" + } +} diff --git a/fixtures/adam_plus_anna/data.json b/fixtures/adam_plus_anna/data.json new file mode 100644 index 000000000..fd25947a0 --- /dev/null +++ b/fixtures/adam_plus_anna/data.json @@ -0,0 +1,130 @@ +{ + "009490cc2f674ce6b576863fbb64f867": { + "active_preset": "home", + "available_schedules": ["Weekschema", "off"], + "climate_mode": "auto", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Living room", + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "select_schedule": "Weekschema", + "sensors": { + "electricity_consumed": 74.2, + "electricity_produced": 0.0, + "temperature": 20.5 + }, + "thermostat": { + "lower_bound": 1.0, + "resolution": 0.01, + "setpoint": 20.5, + "upper_bound": 35.0 + }, + "thermostats": { + "primary": ["ee62cad889f94e8ca3d09021f03a660b"], + "secondary": [] + }, + "vendor": "Plugwise" + }, + "2743216f626f43948deec1f7ab3b3d70": { + "available": false, + "binary_sensors": { + "dhw_state": false, + "flame_state": false, + "heating_state": false + }, + "dev_class": "heater_central", + "location": "07d618f0bb80412687f065b8698ce3e7", + "maximum_boiler_temperature": { + "lower_bound": 0.0, + "resolution": 1.0, + "setpoint": 80.0, + "upper_bound": 100.0 + }, + "model": "Generic heater", + "name": "OpenTherm", + "sensors": { + "intended_boiler_temperature": 0.0, + "water_temperature": 48.0 + }, + "switches": { + "dhw_cm_switch": false + } + }, + "aa6b0002df0a46e1b1eb94beb61eddfe": { + "available": true, + "dev_class": "hometheater_plug", + "firmware": "2019-06-21T02:00:00+02:00", + "location": "45d410adf8fd461e85cebf16d5ead542", + "model": "Plug", + "model_id": "160-01", + "name": "MediaCenter", + "sensors": { + "electricity_consumed": 10.3, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A01" + }, + "b128b4bbbd1f47e9bf4d756e8fb5ee94": { + "binary_sensors": { + "plugwise_notification": true + }, + "dev_class": "gateway", + "firmware": "3.0.15", + "hardware": "AME Smile 2.0 board", + "location": "07d618f0bb80412687f065b8698ce3e7", + "mac_address": "012345670001", + "model": "Gateway", + "model_id": "smile_open_therm", + "name": "Adam", + "notifications": { + "6fb89e35caeb4b1cb275184895202d84": { + "error": "There is no OpenTherm communication with the boiler." + } + }, + "select_regulation_mode": "heating", + "sensors": { + "outdoor_temperature": 11.9 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670101" + }, + "ee62cad889f94e8ca3d09021f03a660b": { + "dev_class": "thermostat", + "location": "009490cc2f674ce6b576863fbb64f867", + "model": "ThermoTouch", + "model_id": "143.1", + "name": "Anna", + "sensors": { + "setpoint": 20.5, + "temperature": 20.5 + }, + "vendor": "Plugwise" + }, + "f2be121e4a9345ac83c6e99ed89a98be": { + "available": true, + "dev_class": "computer_desktop_plug", + "firmware": "2019-06-21T02:00:00+02:00", + "location": "5ccb6c41a7d9403988d261ceee04239f", + "name": "Work-PC", + "sensors": { + "electricity_consumed": 80.5, + "electricity_consumed_interval": 7.03, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A02" + } +} diff --git a/fixtures/adam_plus_anna_new/data.json b/fixtures/adam_plus_anna_new/data.json new file mode 100644 index 000000000..fd87b10ab --- /dev/null +++ b/fixtures/adam_plus_anna_new/data.json @@ -0,0 +1,286 @@ +{ + "056ee145a816487eaa69243c3280f8bf": { + "available": true, + "binary_sensors": { + "dhw_state": false, + "flame_state": true, + "heating_state": true + }, + "dev_class": "heater_central", + "location": "bc93488efab249e5bc54fd7e175a6f91", + "maximum_boiler_temperature": { + "lower_bound": 25.0, + "resolution": 0.01, + "setpoint": 50.0, + "upper_bound": 95.0 + }, + "model": "Generic heater", + "name": "OpenTherm", + "sensors": { + "intended_boiler_temperature": 23.9, + "water_temperature": 30.0 + }, + "switches": { + "dhw_cm_switch": false + } + }, + "10016900610d4c7481df78c89606ef22": { + "available": true, + "dev_class": "valve_actuator_plug", + "location": "d9786723dbcf4f19b5c629a54629f9c7", + "model_id": "TS0011", + "name": "Aanvoer water afsluiter (nous lz3)", + "switches": { + "relay": false + }, + "vendor": "_TZ3000_abjodzas", + "zigbee_mac_address": "A4C13862AF9917B1" + }, + "1772a4ea304041adb83f357b751341ff": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2020-11-04T01:00:00+01:00", + "hardware": "1", + "location": "f871b8c4d63549319221e294e4f88074", + "model": "Tom/Floor", + "model_id": "106-03", + "name": "Tom Badkamer", + "sensors": { + "battery": 99, + "setpoint": 18.0, + "temperature": 17.6, + "temperature_difference": -0.2, + "valve_position": 100 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.1, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "000D6F000C8FF5EE" + }, + "2568cc4b9c1e401495d4741a5f89bee1": { + "available": true, + "dev_class": "hometheater_plug", + "firmware": "2020-11-10T01:00:00+01:00", + "location": "f2bf9048bef64cc5b6d5110154e33c81", + "model": "Plug", + "model_id": "160-01", + "name": "Plug MediaTV", + "sensors": { + "electricity_consumed": 14.8, + "electricity_consumed_interval": 3.0, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": true, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "000D6F000D13CCFD" + }, + "29542b2b6a6a4169acecc15c72a599b8": { + "available": true, + "dev_class": "computer_desktop_plug", + "firmware": "2020-11-10T01:00:00+01:00", + "location": "f2bf9048bef64cc5b6d5110154e33c81", + "model": "Plug", + "model_id": "160-01", + "name": "Plug Werkplek", + "sensors": { + "electricity_consumed": 91.3, + "electricity_consumed_interval": 23.0, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "000D6F000D13CA9A" + }, + "67d73d0bd469422db25a618a5fb8eeb0": { + "available": true, + "dev_class": "heater_central_plug", + "location": "b4f211175e124df59603412bafa77a34", + "model": "Aqara Smart Plug", + "model_id": "lumi.plug.maeu01", + "name": "SmartPlug Floor 0", + "sensors": { + "electricity_consumed_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "LUMI", + "zigbee_mac_address": "54EF4410002C97F2" + }, + "854f8a9b0e7e425db97f1f110e1ce4b3": { + "available": true, + "dev_class": "central_heating_pump_plug", + "firmware": "2020-11-10T01:00:00+01:00", + "location": "f2bf9048bef64cc5b6d5110154e33c81", + "model": "Plug", + "model_id": "160-01", + "name": "Plug Vloerverwarming", + "sensors": { + "electricity_consumed": 43.8, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "000D6F000D13CB6F" + }, + "ad4838d7d35c4d6ea796ee12ae5aedf8": { + "dev_class": "thermostat", + "location": "f2bf9048bef64cc5b6d5110154e33c81", + "model": "ThermoTouch", + "model_id": "143.1", + "name": "Anna", + "sensors": { + "setpoint": 18.5, + "temperature": 18.4 + }, + "vendor": "Plugwise" + }, + "da224107914542988a88561b4452b0f6": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "3.7.8", + "gateway_modes": ["away", "full", "vacation"], + "hardware": "AME Smile 2.0 board", + "location": "bc93488efab249e5bc54fd7e175a6f91", + "mac_address": "012345679891", + "model": "Gateway", + "model_id": "smile_open_therm", + "name": "Adam", + "notifications": {}, + "regulation_modes": ["bleeding_hot", "bleeding_cold", "off", "heating"], + "select_gateway_mode": "full", + "select_regulation_mode": "heating", + "sensors": { + "outdoor_temperature": 9.19 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "000D6F000D5A168D" + }, + "e2f4322d57924fa090fbbc48b3a140dc": { + "available": true, + "binary_sensors": { + "low_battery": true + }, + "dev_class": "zone_thermostat", + "firmware": "2016-10-10T02:00:00+02:00", + "hardware": "255", + "location": "f871b8c4d63549319221e294e4f88074", + "model": "Lisa", + "model_id": "158-01", + "name": "Lisa Badkamer", + "sensors": { + "battery": 14, + "setpoint": 18.0, + "temperature": 16.5 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "000D6F000C869B61" + }, + "e8ef2a01ed3b4139a53bf749204fe6b4": { + "dev_class": "switching", + "members": [ + "2568cc4b9c1e401495d4741a5f89bee1", + "29542b2b6a6a4169acecc15c72a599b8" + ], + "model": "Switchgroup", + "name": "Test", + "switches": { + "relay": true + }, + "vendor": "Plugwise" + }, + "f2bf9048bef64cc5b6d5110154e33c81": { + "active_preset": "home", + "available_schedules": [ + "Badkamer", + "Test", + "Vakantie", + "Weekschema", + "off" + ], + "climate_mode": "auto", + "control_state": "heating", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Living room", + "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], + "select_schedule": "Weekschema", + "sensors": { + "electricity_consumed": 149.9, + "electricity_produced": 0.0, + "temperature": 18.4 + }, + "thermostat": { + "lower_bound": 1.0, + "resolution": 0.01, + "setpoint": 18.5, + "upper_bound": 35.0 + }, + "thermostats": { + "primary": ["ad4838d7d35c4d6ea796ee12ae5aedf8"], + "secondary": [] + }, + "vendor": "Plugwise" + }, + "f871b8c4d63549319221e294e4f88074": { + "active_preset": "home", + "available_schedules": [ + "Badkamer", + "Test", + "Vakantie", + "Weekschema", + "off" + ], + "climate_mode": "auto", + "control_state": "preheating", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Bathroom", + "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], + "select_schedule": "Badkamer", + "sensors": { + "electricity_consumed": 0.0, + "electricity_produced": 0.0, + "temperature": 16.5 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 18.0, + "upper_bound": 99.9 + }, + "thermostats": { + "primary": ["e2f4322d57924fa090fbbc48b3a140dc"], + "secondary": ["1772a4ea304041adb83f357b751341ff"] + }, + "vendor": "Plugwise" + } +} diff --git a/fixtures/adam_plus_anna_new_regulation_off/data.json b/fixtures/adam_plus_anna_new_regulation_off/data.json new file mode 100644 index 000000000..93710a1fa --- /dev/null +++ b/fixtures/adam_plus_anna_new_regulation_off/data.json @@ -0,0 +1,286 @@ +{ + "056ee145a816487eaa69243c3280f8bf": { + "available": true, + "binary_sensors": { + "dhw_state": false, + "flame_state": false, + "heating_state": false + }, + "dev_class": "heater_central", + "location": "bc93488efab249e5bc54fd7e175a6f91", + "maximum_boiler_temperature": { + "lower_bound": 25.0, + "resolution": 0.01, + "setpoint": 50.0, + "upper_bound": 95.0 + }, + "model": "Generic heater", + "name": "OpenTherm", + "sensors": { + "intended_boiler_temperature": 0.0, + "water_temperature": 30.0 + }, + "switches": { + "dhw_cm_switch": false + } + }, + "10016900610d4c7481df78c89606ef22": { + "available": true, + "dev_class": "valve_actuator_plug", + "location": "d9786723dbcf4f19b5c629a54629f9c7", + "model_id": "TS0011", + "name": "Aanvoer water afsluiter (nous lz3)", + "switches": { + "relay": false + }, + "vendor": "_TZ3000_abjodzas", + "zigbee_mac_address": "A4C13862AF9917B1" + }, + "1772a4ea304041adb83f357b751341ff": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2020-11-04T01:00:00+01:00", + "hardware": "1", + "location": "f871b8c4d63549319221e294e4f88074", + "model": "Tom/Floor", + "model_id": "106-03", + "name": "Tom Badkamer", + "sensors": { + "battery": 99, + "setpoint": 18.0, + "temperature": 21.6, + "temperature_difference": -0.2, + "valve_position": 100 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.1, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "000D6F000C8FF5EE" + }, + "2568cc4b9c1e401495d4741a5f89bee1": { + "available": true, + "dev_class": "hometheater_plug", + "firmware": "2020-11-10T01:00:00+01:00", + "location": "f2bf9048bef64cc5b6d5110154e33c81", + "model": "Plug", + "model_id": "160-01", + "name": "Plug MediaTV", + "sensors": { + "electricity_consumed": 14.8, + "electricity_consumed_interval": 3.0, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": true, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "000D6F000D13CCFD" + }, + "29542b2b6a6a4169acecc15c72a599b8": { + "available": true, + "dev_class": "computer_desktop_plug", + "firmware": "2020-11-10T01:00:00+01:00", + "location": "f2bf9048bef64cc5b6d5110154e33c81", + "model": "Plug", + "model_id": "160-01", + "name": "Plug Werkplek", + "sensors": { + "electricity_consumed": 91.3, + "electricity_consumed_interval": 23.0, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "000D6F000D13CA9A" + }, + "67d73d0bd469422db25a618a5fb8eeb0": { + "available": true, + "dev_class": "heater_central_plug", + "location": "b4f211175e124df59603412bafa77a34", + "model": "Aqara Smart Plug", + "model_id": "lumi.plug.maeu01", + "name": "SmartPlug Floor 0", + "sensors": { + "electricity_consumed_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "LUMI", + "zigbee_mac_address": "54EF4410002C97F2" + }, + "854f8a9b0e7e425db97f1f110e1ce4b3": { + "available": true, + "dev_class": "central_heating_pump_plug", + "firmware": "2020-11-10T01:00:00+01:00", + "location": "f2bf9048bef64cc5b6d5110154e33c81", + "model": "Plug", + "model_id": "160-01", + "name": "Plug Vloerverwarming", + "sensors": { + "electricity_consumed": 43.8, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "000D6F000D13CB6F" + }, + "ad4838d7d35c4d6ea796ee12ae5aedf8": { + "dev_class": "thermostat", + "location": "f2bf9048bef64cc5b6d5110154e33c81", + "model": "ThermoTouch", + "model_id": "143.1", + "name": "Anna", + "sensors": { + "setpoint": 18.5, + "temperature": 22.4 + }, + "vendor": "Plugwise" + }, + "da224107914542988a88561b4452b0f6": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "3.7.8", + "gateway_modes": ["away", "full", "vacation"], + "hardware": "AME Smile 2.0 board", + "location": "bc93488efab249e5bc54fd7e175a6f91", + "mac_address": "012345679891", + "model": "Gateway", + "model_id": "smile_open_therm", + "name": "Adam", + "notifications": {}, + "regulation_modes": ["bleeding_hot", "bleeding_cold", "off", "heating"], + "select_gateway_mode": "full", + "select_regulation_mode": "off", + "sensors": { + "outdoor_temperature": 9.19 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "000D6F000D5A168D" + }, + "e2f4322d57924fa090fbbc48b3a140dc": { + "available": true, + "binary_sensors": { + "low_battery": true + }, + "dev_class": "zone_thermostat", + "firmware": "2016-10-10T02:00:00+02:00", + "hardware": "255", + "location": "f871b8c4d63549319221e294e4f88074", + "model": "Lisa", + "model_id": "158-01", + "name": "Lisa Badkamer", + "sensors": { + "battery": 14, + "setpoint": 18.0, + "temperature": 21.5 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "000D6F000C869B61" + }, + "e8ef2a01ed3b4139a53bf749204fe6b4": { + "dev_class": "switching", + "members": [ + "2568cc4b9c1e401495d4741a5f89bee1", + "29542b2b6a6a4169acecc15c72a599b8" + ], + "model": "Switchgroup", + "name": "Test", + "switches": { + "relay": true + }, + "vendor": "Plugwise" + }, + "f2bf9048bef64cc5b6d5110154e33c81": { + "active_preset": "home", + "available_schedules": [ + "Badkamer", + "Test", + "Vakantie", + "Weekschema", + "off" + ], + "climate_mode": "off", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Living room", + "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], + "select_schedule": "off", + "sensors": { + "electricity_consumed": 149.9, + "electricity_produced": 0.0, + "temperature": 22.4 + }, + "thermostat": { + "lower_bound": 1.0, + "resolution": 0.01, + "setpoint": 18.5, + "upper_bound": 35.0 + }, + "thermostats": { + "primary": ["ad4838d7d35c4d6ea796ee12ae5aedf8"], + "secondary": [] + }, + "vendor": "Plugwise" + }, + "f871b8c4d63549319221e294e4f88074": { + "active_preset": "home", + "available_schedules": [ + "Badkamer", + "Test", + "Vakantie", + "Weekschema", + "off" + ], + "climate_mode": "off", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Bathroom", + "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], + "select_schedule": "off", + "sensors": { + "electricity_consumed": 0.0, + "electricity_produced": 0.0, + "temperature": 21.5 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 18.0, + "upper_bound": 99.9 + }, + "thermostats": { + "primary": ["e2f4322d57924fa090fbbc48b3a140dc"], + "secondary": ["1772a4ea304041adb83f357b751341ff"] + }, + "vendor": "Plugwise" + } +} diff --git a/fixtures/adam_zone_per_device/data.json b/fixtures/adam_zone_per_device/data.json new file mode 100644 index 000000000..b53a5c357 --- /dev/null +++ b/fixtures/adam_zone_per_device/data.json @@ -0,0 +1,590 @@ +{ + "02cf28bfec924855854c544690a609ef": { + "available": true, + "dev_class": "vcr_plug", + "firmware": "2019-06-21T02:00:00+02:00", + "location": "c4d2bda6df8146caa2e5c2b5dc65660e", + "model": "Plug", + "model_id": "160-01", + "name": "NVR", + "sensors": { + "electricity_consumed": 34.0, + "electricity_consumed_interval": 8.65, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": true, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A15" + }, + "08963fec7c53423ca5680aa4cb502c63": { + "active_preset": "away", + "available_schedules": [ + "CV Roan", + "Bios Schema met Film Avond", + "GF7 Woonkamer", + "Badkamer Schema", + "CV Jessie", + "off" + ], + "climate_mode": "auto", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Badkamer", + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "select_schedule": "Badkamer Schema", + "sensors": { + "temperature": 18.8 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 14.0, + "upper_bound": 100.0 + }, + "thermostats": { + "primary": ["f1fee6043d3642a9b0a65297455f008e"], + "secondary": ["680423ff840043738f42cc7f1ff97a36"] + }, + "vendor": "Plugwise" + }, + "12493538af164a409c6a1c79e38afe1c": { + "active_preset": "away", + "available_schedules": [ + "CV Roan", + "Bios Schema met Film Avond", + "GF7 Woonkamer", + "Badkamer Schema", + "CV Jessie", + "off" + ], + "climate_mode": "heat", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Bios", + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "select_schedule": "off", + "sensors": { + "electricity_consumed": 0.0, + "electricity_produced": 0.0, + "temperature": 16.5 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 13.0, + "upper_bound": 100.0 + }, + "thermostats": { + "primary": ["df4a4a8169904cdb9c03d61a21f42140"], + "secondary": ["a2c3583e0a6349358998b760cea82d2a"] + }, + "vendor": "Plugwise" + }, + "21f2b542c49845e6bb416884c55778d6": { + "available": true, + "dev_class": "game_console_plug", + "firmware": "2019-06-21T02:00:00+02:00", + "location": "4efbab4c8bb84fbab26c8decf670eb96", + "model": "Plug", + "model_id": "160-01", + "name": "Playstation Smart Plug", + "sensors": { + "electricity_consumed": 80.1, + "electricity_consumed_interval": 12.7, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A12" + }, + "446ac08dd04d4eff8ac57489757b7314": { + "active_preset": "no_frost", + "available_schedules": [ + "CV Roan", + "Bios Schema met Film Avond", + "GF7 Woonkamer", + "Badkamer Schema", + "CV Jessie", + "off" + ], + "climate_mode": "heat", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Garage", + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "select_schedule": "off", + "sensors": { + "temperature": 15.6 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 5.5, + "upper_bound": 100.0 + }, + "thermostats": { + "primary": ["e7693eb9582644e5b865dba8d4447cf1"], + "secondary": [] + }, + "vendor": "Plugwise" + }, + "4a810418d5394b3f82727340b91ba740": { + "available": true, + "dev_class": "router_plug", + "firmware": "2019-06-21T02:00:00+02:00", + "location": "0217e9743c174eef9d6e9f680d403ce2", + "model": "Plug", + "model_id": "160-01", + "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_plug", + "firmware": "2019-06-21T02:00:00+02:00", + "location": "2b1591ecf6344d4d93b03dece9747648", + "model": "Plug", + "model_id": "160-01", + "name": "Ziggo Modem", + "sensors": { + "electricity_consumed": 12.2, + "electricity_consumed_interval": 2.8, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": true, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A01" + }, + "680423ff840043738f42cc7f1ff97a36": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2019-03-27T01:00:00+01:00", + "hardware": "1", + "location": "08963fec7c53423ca5680aa4cb502c63", + "model": "Tom/Floor", + "model_id": "106-03", + "name": "Thermostatic Radiator Badkamer", + "sensors": { + "battery": 51, + "setpoint": 14.0, + "temperature": 19.1, + "temperature_difference": -0.3, + "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": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "zone_thermostat", + "firmware": "2016-10-27T02:00:00+02:00", + "hardware": "255", + "location": "82fa13f017d240daa0d0ea1775420f24", + "model": "Lisa", + "model_id": "158-01", + "name": "Zone Thermostat Jessie", + "sensors": { + "battery": 37, + "setpoint": 16.0, + "temperature": 17.1 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A03" + }, + "78d1126fc4c743db81b61c20e88342a7": { + "available": true, + "dev_class": "central_heating_pump_plug", + "firmware": "2019-06-21T02:00:00+02:00", + "location": "c50f167537524366a5af7aa3942feb1e", + "model": "Plug", + "model_id": "160-01", + "name": "CV Pomp", + "sensors": { + "electricity_consumed": 35.8, + "electricity_consumed_interval": 5.85, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A05" + }, + "82fa13f017d240daa0d0ea1775420f24": { + "active_preset": "asleep", + "available_schedules": [ + "CV Roan", + "Bios Schema met Film Avond", + "GF7 Woonkamer", + "Badkamer Schema", + "CV Jessie", + "off" + ], + "climate_mode": "auto", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Jessie", + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "select_schedule": "CV Jessie", + "sensors": { + "temperature": 17.1 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 16.0, + "upper_bound": 100.0 + }, + "thermostats": { + "primary": ["6a3bf693d05e48e0b460c815a4fdd09d"], + "secondary": ["d3da73bde12a47d5a6b8f9dad971f2ec"] + }, + "vendor": "Plugwise" + }, + "90986d591dcd426cae3ec3e8111ff730": { + "binary_sensors": { + "heating_state": true + }, + "dev_class": "heater_central", + "location": "1f9dcf83fd4e4b66b72ff787957bfe5d", + "model": "Unknown", + "name": "OnOff", + "sensors": { + "intended_boiler_temperature": 70.0, + "modulation_level": 1, + "water_temperature": 70.0 + } + }, + "a28f588dc4a049a483fd03a30361ad3a": { + "available": true, + "dev_class": "settop_plug", + "firmware": "2019-06-21T02:00:00+02:00", + "location": "cd143c07248f491493cea0533bc3d669", + "model": "Plug", + "model_id": "160-01", + "name": "Fibaro HC2", + "sensors": { + "electricity_consumed": 12.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": "ABCD012345670A13" + }, + "a2c3583e0a6349358998b760cea82d2a": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2019-03-27T01:00:00+01:00", + "hardware": "1", + "location": "12493538af164a409c6a1c79e38afe1c", + "model": "Tom/Floor", + "model_id": "106-03", + "name": "Bios Cv Thermostatic Radiator ", + "sensors": { + "battery": 62, + "setpoint": 13.0, + "temperature": 17.1, + "temperature_difference": -0.1, + "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": "ABCD012345670A09" + }, + "b310b72a0e354bfab43089919b9a88bf": { + "available": true, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2019-03-27T01:00:00+01:00", + "hardware": "1", + "location": "c50f167537524366a5af7aa3942feb1e", + "model": "Tom/Floor", + "model_id": "106-03", + "name": "Floor kraan", + "sensors": { + "setpoint": 21.5, + "temperature": 26.2, + "temperature_difference": 3.7, + "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": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "zone_thermostat", + "firmware": "2016-08-02T02:00:00+02:00", + "hardware": "255", + "location": "c50f167537524366a5af7aa3942feb1e", + "model": "Lisa", + "model_id": "158-01", + "name": "Zone Lisa WK", + "sensors": { + "battery": 34, + "setpoint": 21.5, + "temperature": 21.1 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A07" + }, + "c50f167537524366a5af7aa3942feb1e": { + "active_preset": "home", + "available_schedules": [ + "CV Roan", + "Bios Schema met Film Avond", + "GF7 Woonkamer", + "Badkamer Schema", + "CV Jessie", + "off" + ], + "climate_mode": "auto", + "control_state": "heating", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Woonkamer", + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "select_schedule": "GF7 Woonkamer", + "sensors": { + "electricity_consumed": 35.8, + "electricity_produced": 0.0, + "temperature": 21.1 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 21.5, + "upper_bound": 100.0 + }, + "thermostats": { + "primary": ["b59bcebaf94b499ea7d46e4a66fb62d8"], + "secondary": ["b310b72a0e354bfab43089919b9a88bf"] + }, + "vendor": "Plugwise" + }, + "cd0ddb54ef694e11ac18ed1cbce5dbbd": { + "available": true, + "dev_class": "vcr_plug", + "firmware": "2019-06-21T02:00:00+02:00", + "location": "e704bae65654496f9cade9c855decdfe", + "model": "Plug", + "model_id": "160-01", + "name": "NAS", + "sensors": { + "electricity_consumed": 16.5, + "electricity_consumed_interval": 0.29, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": true, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A14" + }, + "d3da73bde12a47d5a6b8f9dad971f2ec": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2019-03-27T01:00:00+01:00", + "hardware": "1", + "location": "82fa13f017d240daa0d0ea1775420f24", + "model": "Tom/Floor", + "model_id": "106-03", + "name": "Thermostatic Radiator Jessie", + "sensors": { + "battery": 62, + "setpoint": 16.0, + "temperature": 16.9, + "temperature_difference": 0.1, + "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": "ABCD012345670A10" + }, + "df4a4a8169904cdb9c03d61a21f42140": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "zone_thermostat", + "firmware": "2016-10-27T02:00:00+02:00", + "hardware": "255", + "location": "12493538af164a409c6a1c79e38afe1c", + "model": "Lisa", + "model_id": "158-01", + "name": "Zone Lisa Bios", + "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 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A06" + }, + "e7693eb9582644e5b865dba8d4447cf1": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2019-03-27T01:00:00+01:00", + "hardware": "1", + "location": "446ac08dd04d4eff8ac57489757b7314", + "model": "Tom/Floor", + "model_id": "106-03", + "name": "CV Kraan Garage", + "sensors": { + "battery": 68, + "setpoint": 5.5, + "temperature": 15.6, + "temperature_difference": 0.1, + "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": "ABCD012345670A11" + }, + "f1fee6043d3642a9b0a65297455f008e": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "zone_thermostat", + "firmware": "2016-10-27T02:00:00+02:00", + "hardware": "255", + "location": "08963fec7c53423ca5680aa4cb502c63", + "model": "Lisa", + "model_id": "158-01", + "name": "Zone Thermostat Badkamer", + "sensors": { + "battery": 92, + "setpoint": 14.0, + "temperature": 18.8 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "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", + "model_id": "smile_open_therm", + "name": "Adam", + "notifications": { + "af82e4ccf9c548528166d38e560662a4": { + "warning": "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device." + } + }, + "select_regulation_mode": "heating", + "sensors": { + "outdoor_temperature": 7.69 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670101" + } +} diff --git a/fixtures/anna_elga_2/data.json b/fixtures/anna_elga_2/data.json new file mode 100644 index 000000000..e417927a2 --- /dev/null +++ b/fixtures/anna_elga_2/data.json @@ -0,0 +1,85 @@ +{ + "573c152e7d4f4720878222bd75638f5b": { + "available": true, + "binary_sensors": { + "compressor_state": true, + "cooling_enabled": false, + "cooling_state": false, + "dhw_state": false, + "flame_state": true, + "heating_state": true, + "secondary_boiler_state": true + }, + "dev_class": "heater_central", + "location": "d34dfe6ab90b410c98068e75de3eb631", + "model": "Generic heater/cooler", + "name": "OpenTherm", + "sensors": { + "domestic_hot_water_setpoint": 60.0, + "intended_boiler_temperature": 58.3, + "modulation_level": 55, + "outdoor_air_temperature": 6.0, + "return_temperature": 35.5, + "water_pressure": 0.5, + "water_temperature": 42.6 + }, + "switches": { + "dhw_cm_switch": false + }, + "vendor": "Techneco" + }, + "ebd90df1ab334565b5895f37590ccff4": { + "active_preset": "home", + "available_schedules": ["Thermostat schedule", "off"], + "climate_mode": "auto", + "control_state": "heating", + "dev_class": "thermostat", + "firmware": "2018-02-08T11:15:53+01:00", + "hardware": "6539-1301-5002", + "location": "d3ce834534114348be628b61b26d9220", + "model": "ThermoTouch", + "name": "Anna", + "preset_modes": ["away", "no_frost", "vacation", "home", "asleep"], + "select_schedule": "Thermostat schedule", + "sensors": { + "cooling_activation_outdoor_temperature": 24.0, + "cooling_deactivation_threshold": 2.0, + "illuminance": 0.5, + "setpoint_high": 30.0, + "setpoint_low": 19.5, + "temperature": 19.2 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "thermostat": { + "lower_bound": 4.0, + "resolution": 0.1, + "setpoint_high": 30.0, + "setpoint_low": 19.5, + "upper_bound": 30.0 + }, + "vendor": "Plugwise" + }, + "fb49af122f6e4b0f91267e1cf7666d6f": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "4.4.1", + "hardware": "AME Smile 2.0 board", + "location": "d34dfe6ab90b410c98068e75de3eb631", + "mac_address": "C4930002FE76", + "model": "Gateway", + "model_id": "smile_thermo", + "name": "Smile Anna", + "notifications": {}, + "sensors": { + "outdoor_temperature": 6.38 + }, + "vendor": "Plugwise" + } +} diff --git a/fixtures/anna_elga_2_cooling/data.json b/fixtures/anna_elga_2_cooling/data.json new file mode 100644 index 000000000..0c417702b --- /dev/null +++ b/fixtures/anna_elga_2_cooling/data.json @@ -0,0 +1,91 @@ +{ + "573c152e7d4f4720878222bd75638f5b": { + "available": true, + "binary_sensors": { + "compressor_state": true, + "cooling_enabled": true, + "cooling_state": true, + "dhw_state": false, + "flame_state": false, + "heating_state": false, + "secondary_boiler_state": false + }, + "dev_class": "heater_central", + "location": "d34dfe6ab90b410c98068e75de3eb631", + "maximum_boiler_temperature": { + "lower_bound": 0.0, + "resolution": 1.0, + "setpoint": 60.0, + "upper_bound": 100.0 + }, + "model": "Generic heater/cooler", + "name": "OpenTherm", + "sensors": { + "domestic_hot_water_setpoint": 60.0, + "intended_boiler_temperature": 0.0, + "modulation_level": 0.0, + "outdoor_air_temperature": 30.0, + "return_temperature": 23.4, + "water_pressure": 0.5, + "water_temperature": 22.8 + }, + "switches": { + "dhw_cm_switch": true + }, + "vendor": "Techneco" + }, + "ebd90df1ab334565b5895f37590ccff4": { + "active_preset": "home", + "available_schedules": ["Thermostat schedule", "off"], + "climate_mode": "auto", + "control_state": "cooling", + "dev_class": "thermostat", + "firmware": "2018-02-08T11:15:53+01:00", + "hardware": "6539-1301-5002", + "location": "d3ce834534114348be628b61b26d9220", + "model": "ThermoTouch", + "name": "Anna", + "preset_modes": ["away", "no_frost", "vacation", "home", "asleep"], + "select_schedule": "Thermostat schedule", + "sensors": { + "cooling_activation_outdoor_temperature": 26.0, + "cooling_deactivation_threshold": 3.0, + "illuminance": 0.5, + "setpoint_high": 23.0, + "setpoint_low": 4.0, + "temperature": 24.9 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "thermostat": { + "lower_bound": 4.0, + "resolution": 0.1, + "setpoint_high": 23.0, + "setpoint_low": 4.0, + "upper_bound": 30.0 + }, + "vendor": "Plugwise" + }, + "fb49af122f6e4b0f91267e1cf7666d6f": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "4.2.1", + "hardware": "AME Smile 2.0 board", + "location": "d34dfe6ab90b410c98068e75de3eb631", + "mac_address": "C4930002FE76", + "model": "Gateway", + "model_id": "smile_thermo", + "name": "Smile Anna", + "notifications": {}, + "sensors": { + "outdoor_temperature": 31.0 + }, + "vendor": "Plugwise" + } +} diff --git a/fixtures/anna_elga_2_schedule_off/data.json b/fixtures/anna_elga_2_schedule_off/data.json new file mode 100644 index 000000000..064a483d8 --- /dev/null +++ b/fixtures/anna_elga_2_schedule_off/data.json @@ -0,0 +1,91 @@ +{ + "573c152e7d4f4720878222bd75638f5b": { + "available": true, + "binary_sensors": { + "compressor_state": false, + "cooling_enabled": false, + "cooling_state": false, + "dhw_state": false, + "flame_state": false, + "heating_state": false, + "secondary_boiler_state": false + }, + "dev_class": "heater_central", + "location": "d34dfe6ab90b410c98068e75de3eb631", + "maximum_boiler_temperature": { + "lower_bound": 0.0, + "resolution": 1.0, + "setpoint": 60.0, + "upper_bound": 100.0 + }, + "model": "Generic heater/cooler", + "name": "OpenTherm", + "sensors": { + "domestic_hot_water_setpoint": 60.0, + "intended_boiler_temperature": 0.0, + "modulation_level": 0.0, + "outdoor_air_temperature": 13.0, + "return_temperature": 23.4, + "water_pressure": 0.5, + "water_temperature": 22.8 + }, + "switches": { + "dhw_cm_switch": true + }, + "vendor": "Techneco" + }, + "ebd90df1ab334565b5895f37590ccff4": { + "active_preset": "home", + "available_schedules": ["Thermostat schedule", "off"], + "climate_mode": "heat_cool", + "control_state": "idle", + "dev_class": "thermostat", + "firmware": "2018-02-08T11:15:53+01:00", + "hardware": "6539-1301-5002", + "location": "d3ce834534114348be628b61b26d9220", + "model": "ThermoTouch", + "name": "Anna", + "preset_modes": ["away", "no_frost", "vacation", "home", "asleep"], + "select_schedule": "off", + "sensors": { + "cooling_activation_outdoor_temperature": 26.0, + "cooling_deactivation_threshold": 3.0, + "illuminance": 0.5, + "setpoint_high": 30.0, + "setpoint_low": 19.5, + "temperature": 20.9 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "thermostat": { + "lower_bound": 4.0, + "resolution": 0.1, + "setpoint_high": 30.0, + "setpoint_low": 19.5, + "upper_bound": 30.0 + }, + "vendor": "Plugwise" + }, + "fb49af122f6e4b0f91267e1cf7666d6f": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "4.2.1", + "hardware": "AME Smile 2.0 board", + "location": "d34dfe6ab90b410c98068e75de3eb631", + "mac_address": "C4930002FE76", + "model": "Gateway", + "model_id": "smile_thermo", + "name": "Smile Anna", + "notifications": {}, + "sensors": { + "outdoor_temperature": 13.0 + }, + "vendor": "Plugwise" + } +} diff --git a/fixtures/anna_elga_no_cooling/data.json b/fixtures/anna_elga_no_cooling/data.json new file mode 100644 index 000000000..23ec151d4 --- /dev/null +++ b/fixtures/anna_elga_no_cooling/data.json @@ -0,0 +1,93 @@ +{ + "015ae9ea3f964e668e490fa39da3870b": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "4.0.15", + "hardware": "AME Smile 2.0 board", + "location": "a57efe5f145f498c9be62a9b63626fbf", + "mac_address": "012345670001", + "model": "Gateway", + "model_id": "smile_thermo", + "name": "Smile Anna", + "notifications": {}, + "sensors": { + "outdoor_temperature": 20.2 + }, + "vendor": "Plugwise" + }, + "1cbf783bb11e4a7c8a6843dee3a86927": { + "available": true, + "binary_sensors": { + "compressor_state": true, + "dhw_state": false, + "flame_state": false, + "heating_state": true, + "secondary_boiler_state": false + }, + "dev_class": "heater_central", + "location": "a57efe5f145f498c9be62a9b63626fbf", + "max_dhw_temperature": { + "lower_bound": 35.0, + "resolution": 0.01, + "setpoint": 53.0, + "upper_bound": 60.0 + }, + "maximum_boiler_temperature": { + "lower_bound": 0.0, + "resolution": 1.0, + "setpoint": 60.0, + "upper_bound": 100.0 + }, + "model": "Generic heater", + "name": "OpenTherm", + "sensors": { + "dhw_temperature": 46.3, + "intended_boiler_temperature": 35.0, + "modulation_level": 52, + "outdoor_air_temperature": 3.0, + "return_temperature": 25.1, + "water_pressure": 1.57, + "water_temperature": 29.1 + }, + "switches": { + "dhw_cm_switch": false + }, + "vendor": "Techneco" + }, + "3cb70739631c4d17a86b8b12e8a5161b": { + "active_preset": "home", + "available_schedules": ["standaard", "off"], + "climate_mode": "auto", + "control_state": "heating", + "dev_class": "thermostat", + "firmware": "2018-02-08T11:15:53+01:00", + "hardware": "6539-1301-5002", + "location": "c784ee9fdab44e1395b8dee7d7a497d5", + "model": "ThermoTouch", + "name": "Anna", + "preset_modes": ["no_frost", "home", "away", "asleep", "vacation"], + "select_schedule": "standaard", + "sensors": { + "cooling_activation_outdoor_temperature": 21.0, + "cooling_deactivation_threshold": 4.0, + "illuminance": 86.0, + "setpoint": 20.5, + "temperature": 19.3 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": -0.5, + "upper_bound": 2.0 + }, + "thermostat": { + "lower_bound": 4.0, + "resolution": 0.1, + "setpoint": 20.5, + "upper_bound": 30.0 + }, + "vendor": "Plugwise" + } +} diff --git a/fixtures/anna_heatpump_cooling/data.json b/fixtures/anna_heatpump_cooling/data.json new file mode 100644 index 000000000..c722045a2 --- /dev/null +++ b/fixtures/anna_heatpump_cooling/data.json @@ -0,0 +1,92 @@ +{ + "015ae9ea3f964e668e490fa39da3870b": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "4.0.15", + "hardware": "AME Smile 2.0 board", + "location": "a57efe5f145f498c9be62a9b63626fbf", + "mac_address": "012345670001", + "model": "Gateway", + "model_id": "smile_thermo", + "name": "Smile Anna", + "notifications": {}, + "sensors": { + "outdoor_temperature": 22.0 + }, + "vendor": "Plugwise" + }, + "1cbf783bb11e4a7c8a6843dee3a86927": { + "available": true, + "binary_sensors": { + "compressor_state": true, + "cooling_enabled": true, + "cooling_state": true, + "dhw_state": false, + "flame_state": false, + "heating_state": false, + "secondary_boiler_state": false + }, + "dev_class": "heater_central", + "location": "a57efe5f145f498c9be62a9b63626fbf", + "maximum_boiler_temperature": { + "lower_bound": 0.0, + "resolution": 1.0, + "setpoint": 60.0, + "upper_bound": 100.0 + }, + "model": "Generic heater/cooler", + "name": "OpenTherm", + "sensors": { + "dhw_temperature": 41.5, + "domestic_hot_water_setpoint": 60.0, + "intended_boiler_temperature": 0.0, + "modulation_level": 40, + "outdoor_air_temperature": 22.0, + "return_temperature": 23.8, + "water_pressure": 1.61, + "water_temperature": 24.7 + }, + "switches": { + "dhw_cm_switch": false + }, + "vendor": "Techneco" + }, + "3cb70739631c4d17a86b8b12e8a5161b": { + "active_preset": "home", + "available_schedules": ["standaard", "off"], + "climate_mode": "heat_cool", + "control_state": "cooling", + "dev_class": "thermostat", + "firmware": "2018-02-08T11:15:53+01:00", + "hardware": "6539-1301-5002", + "location": "c784ee9fdab44e1395b8dee7d7a497d5", + "model": "ThermoTouch", + "name": "Anna", + "preset_modes": ["no_frost", "home", "away", "asleep", "vacation"], + "select_schedule": "off", + "sensors": { + "cooling_activation_outdoor_temperature": 21.0, + "cooling_deactivation_threshold": 6.0, + "illuminance": 24.5, + "setpoint_high": 22.0, + "setpoint_low": 4.0, + "temperature": 22.3 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": -0.5, + "upper_bound": 2.0 + }, + "thermostat": { + "lower_bound": 4.0, + "resolution": 0.1, + "setpoint_high": 22.0, + "setpoint_low": 4.0, + "upper_bound": 30.0 + }, + "vendor": "Plugwise" + } +} diff --git a/fixtures/anna_heatpump_cooling_fake_firmware/data.json b/fixtures/anna_heatpump_cooling_fake_firmware/data.json new file mode 100644 index 000000000..4218240cb --- /dev/null +++ b/fixtures/anna_heatpump_cooling_fake_firmware/data.json @@ -0,0 +1,92 @@ +{ + "015ae9ea3f964e668e490fa39da3870b": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "4.10.10", + "hardware": "AME Smile 2.0 board", + "location": "a57efe5f145f498c9be62a9b63626fbf", + "mac_address": "012345670001", + "model": "Gateway", + "model_id": "smile_thermo", + "name": "Smile Anna", + "notifications": {}, + "sensors": { + "outdoor_temperature": 22.0 + }, + "vendor": "Plugwise" + }, + "1cbf783bb11e4a7c8a6843dee3a86927": { + "available": true, + "binary_sensors": { + "compressor_state": true, + "cooling_enabled": true, + "cooling_state": true, + "dhw_state": false, + "flame_state": false, + "heating_state": false, + "secondary_boiler_state": false + }, + "dev_class": "heater_central", + "location": "a57efe5f145f498c9be62a9b63626fbf", + "maximum_boiler_temperature": { + "lower_bound": 0.0, + "resolution": 1.0, + "setpoint": 60.0, + "upper_bound": 100.0 + }, + "model": "Generic heater/cooler", + "name": "OpenTherm", + "sensors": { + "dhw_temperature": 41.5, + "domestic_hot_water_setpoint": 60.0, + "intended_boiler_temperature": 0.0, + "modulation_level": 100, + "outdoor_air_temperature": 22.0, + "return_temperature": 23.8, + "water_pressure": 1.61, + "water_temperature": 24.7 + }, + "switches": { + "dhw_cm_switch": false + }, + "vendor": "Techneco" + }, + "3cb70739631c4d17a86b8b12e8a5161b": { + "active_preset": "home", + "available_schedules": ["standaard", "off"], + "climate_mode": "heat_cool", + "control_state": "cooling", + "dev_class": "thermostat", + "firmware": "2018-02-08T11:15:53+01:00", + "hardware": "6539-1301-5002", + "location": "c784ee9fdab44e1395b8dee7d7a497d5", + "model": "ThermoTouch", + "name": "Anna", + "preset_modes": ["no_frost", "home", "away", "asleep", "vacation"], + "select_schedule": "off", + "sensors": { + "cooling_activation_outdoor_temperature": 21.0, + "cooling_deactivation_threshold": 6.0, + "illuminance": 24.5, + "setpoint_high": 22.0, + "setpoint_low": 4.0, + "temperature": 22.3 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": -0.5, + "upper_bound": 2.0 + }, + "thermostat": { + "lower_bound": 4.0, + "resolution": 0.1, + "setpoint_high": 22.0, + "setpoint_low": 4.0, + "upper_bound": 30.0 + }, + "vendor": "Plugwise" + } +} diff --git a/fixtures/anna_heatpump_heating/data.json b/fixtures/anna_heatpump_heating/data.json new file mode 100644 index 000000000..ab6bdf08e --- /dev/null +++ b/fixtures/anna_heatpump_heating/data.json @@ -0,0 +1,97 @@ +{ + "015ae9ea3f964e668e490fa39da3870b": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "4.0.15", + "hardware": "AME Smile 2.0 board", + "location": "a57efe5f145f498c9be62a9b63626fbf", + "mac_address": "012345670001", + "model": "Gateway", + "model_id": "smile_thermo", + "name": "Smile Anna", + "notifications": {}, + "sensors": { + "outdoor_temperature": 20.2 + }, + "vendor": "Plugwise" + }, + "1cbf783bb11e4a7c8a6843dee3a86927": { + "available": true, + "binary_sensors": { + "compressor_state": true, + "cooling_enabled": false, + "cooling_state": false, + "dhw_state": false, + "flame_state": false, + "heating_state": true, + "secondary_boiler_state": false + }, + "dev_class": "heater_central", + "location": "a57efe5f145f498c9be62a9b63626fbf", + "max_dhw_temperature": { + "lower_bound": 35.0, + "resolution": 0.01, + "setpoint": 53.0, + "upper_bound": 60.0 + }, + "maximum_boiler_temperature": { + "lower_bound": 0.0, + "resolution": 1.0, + "setpoint": 60.0, + "upper_bound": 100.0 + }, + "model": "Generic heater/cooler", + "name": "OpenTherm", + "sensors": { + "dhw_temperature": 46.3, + "intended_boiler_temperature": 35.0, + "modulation_level": 52, + "outdoor_air_temperature": 3.0, + "return_temperature": 25.1, + "water_pressure": 1.57, + "water_temperature": 29.1 + }, + "switches": { + "dhw_cm_switch": false + }, + "vendor": "Techneco" + }, + "3cb70739631c4d17a86b8b12e8a5161b": { + "active_preset": "home", + "available_schedules": ["standaard", "off"], + "climate_mode": "auto", + "control_state": "heating", + "dev_class": "thermostat", + "firmware": "2018-02-08T11:15:53+01:00", + "hardware": "6539-1301-5002", + "location": "c784ee9fdab44e1395b8dee7d7a497d5", + "model": "ThermoTouch", + "name": "Anna", + "preset_modes": ["no_frost", "home", "away", "asleep", "vacation"], + "select_schedule": "standaard", + "sensors": { + "cooling_activation_outdoor_temperature": 21.0, + "cooling_deactivation_threshold": 4.0, + "illuminance": 86.0, + "setpoint_high": 30.0, + "setpoint_low": 20.5, + "temperature": 19.3 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": -0.5, + "upper_bound": 2.0 + }, + "thermostat": { + "lower_bound": 4.0, + "resolution": 0.1, + "setpoint_high": 30.0, + "setpoint_low": 20.5, + "upper_bound": 30.0 + }, + "vendor": "Plugwise" + } +} diff --git a/fixtures/anna_loria_cooling_active/data.json b/fixtures/anna_loria_cooling_active/data.json new file mode 100644 index 000000000..8b6c7341e --- /dev/null +++ b/fixtures/anna_loria_cooling_active/data.json @@ -0,0 +1,96 @@ +{ + "582dfbdace4d4aeb832923ce7d1ddda0": { + "active_preset": "home", + "available_schedules": ["Winter", "Test ", "off"], + "climate_mode": "auto", + "control_state": "cooling", + "dev_class": "thermostat", + "firmware": "2018-02-08T11:15:53+01:00", + "hardware": "6539-1301-5002", + "location": "15da035090b847e7a21f93e08c015ebc", + "model": "ThermoTouch", + "name": "Anna", + "preset_modes": ["away", "vacation", "no_frost", "home", "asleep"], + "select_schedule": "Winter", + "sensors": { + "illuminance": 45.0, + "setpoint_high": 23.5, + "setpoint_low": 4.0, + "temperature": 24.1 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "thermostat": { + "lower_bound": 4.0, + "resolution": 0.1, + "setpoint_high": 23.5, + "setpoint_low": 4.0, + "upper_bound": 30.0 + }, + "vendor": "Plugwise" + }, + "9ff0569b4984459fb243af64c0901894": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "4.3.8", + "hardware": "AME Smile 2.0 board", + "location": "674b657c138a41a291d315d7471deb06", + "mac_address": "C493000278E2", + "model": "Gateway", + "model_id": "smile_thermo", + "name": "Smile Anna", + "notifications": {}, + "sensors": { + "outdoor_temperature": 15.5 + }, + "vendor": "Plugwise" + }, + "bfb5ee0a88e14e5f97bfa725a760cc49": { + "available": true, + "binary_sensors": { + "cooling_enabled": true, + "cooling_state": true, + "dhw_state": false, + "flame_state": false, + "heating_state": false + }, + "dev_class": "heater_central", + "dhw_modes": ["off", "auto", "boost", "eco", "comfort"], + "location": "674b657c138a41a291d315d7471deb06", + "max_dhw_temperature": { + "lower_bound": 35.0, + "resolution": 0.01, + "setpoint": 53.0, + "upper_bound": 60.0 + }, + "maximum_boiler_temperature": { + "lower_bound": 25.0, + "resolution": 0.01, + "setpoint": 40.0, + "upper_bound": 45.0 + }, + "model": "Generic heater/cooler", + "model_id": "173", + "name": "OpenTherm", + "select_dhw_mode": "auto", + "sensors": { + "dhw_temperature": 52.9, + "intended_boiler_temperature": 0.0, + "modulation_level": 100, + "outdoor_air_temperature": 17.2, + "return_temperature": 26.3, + "water_temperature": 25.3 + }, + "switches": { + "cooling_ena_switch": true, + "dhw_cm_switch": true + }, + "vendor": "Atlantic" + } +} diff --git a/fixtures/anna_loria_driessens/data.json b/fixtures/anna_loria_driessens/data.json new file mode 100644 index 000000000..2519d1f45 --- /dev/null +++ b/fixtures/anna_loria_driessens/data.json @@ -0,0 +1,102 @@ +{ + "5c118b1842e943c0a5b6ef88a60bb17a": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "4.4.1", + "hardware": "AME Smile 2.0 board", + "location": "82c15f65c9bf44c592d69e16139355e3", + "mac_address": "D40FB2011556", + "model": "Gateway", + "model_id": "smile_thermo", + "name": "Smile Anna", + "notifications": {}, + "sensors": { + "outdoor_temperature": 6.81 + }, + "vendor": "Plugwise" + }, + "9fb768d699e44c7fb5cc50309dc4e7d4": { + "active_preset": "home", + "available_schedules": [ + "Verwarmen@9-23u", + "VAKANTIE (winter)", + "VERWARMEN", + "KOELEN", + "off" + ], + "climate_mode": "auto", + "control_state": "idle", + "dev_class": "thermostat", + "firmware": "2018-02-08T11:15:53+01:00", + "hardware": "6539-1301-5002", + "location": "fa70e08550c94de3a34feb27ecf31421", + "model": "ThermoTouch", + "name": "Anna", + "preset_modes": ["no_frost", "asleep", "vacation", "away", "home"], + "select_schedule": "Verwarmen@9-23u", + "sensors": { + "illuminance": 5.5, + "setpoint_high": 30.0, + "setpoint_low": 20.0, + "temperature": 21.2 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "thermostat": { + "lower_bound": 4.0, + "resolution": 0.1, + "setpoint_high": 30.0, + "setpoint_low": 20.0, + "upper_bound": 30.0 + }, + "vendor": "Plugwise" + }, + "a449cbc334ae4a5bb7f89064984b2906": { + "available": true, + "binary_sensors": { + "cooling_enabled": false, + "cooling_state": false, + "dhw_state": false, + "flame_state": false, + "heating_state": false + }, + "dev_class": "heater_central", + "dhw_modes": ["comfort", "eco", "off", "boost", "auto"], + "location": "82c15f65c9bf44c592d69e16139355e3", + "max_dhw_temperature": { + "lower_bound": 35.0, + "resolution": 0.01, + "setpoint": 53.0, + "upper_bound": 60.0 + }, + "maximum_boiler_temperature": { + "lower_bound": 25.0, + "resolution": 0.01, + "setpoint": 45.0, + "upper_bound": 45.0 + }, + "model": "Generic heater/cooler", + "model_id": "173", + "name": "OpenTherm", + "select_dhw_mode": "auto", + "sensors": { + "dhw_temperature": 49.5, + "intended_boiler_temperature": 0.0, + "modulation_level": 0.0, + "outdoor_air_temperature": 7.5, + "return_temperature": 23.0, + "water_temperature": 23.3 + }, + "switches": { + "cooling_ena_switch": false, + "dhw_cm_switch": true + }, + "vendor": "Atlantic" + } +} diff --git a/fixtures/anna_loria_heating_idle/data.json b/fixtures/anna_loria_heating_idle/data.json new file mode 100644 index 000000000..d1b640345 --- /dev/null +++ b/fixtures/anna_loria_heating_idle/data.json @@ -0,0 +1,96 @@ +{ + "582dfbdace4d4aeb832923ce7d1ddda0": { + "active_preset": "home", + "available_schedules": ["Winter", "Test ", "off"], + "climate_mode": "auto", + "control_state": "idle", + "dev_class": "thermostat", + "firmware": "2018-02-08T11:15:53+01:00", + "hardware": "6539-1301-5002", + "location": "15da035090b847e7a21f93e08c015ebc", + "model": "ThermoTouch", + "name": "Anna", + "preset_modes": ["away", "vacation", "no_frost", "home", "asleep"], + "select_schedule": "Winter", + "sensors": { + "illuminance": 45.0, + "setpoint_high": 30.0, + "setpoint_low": 20.5, + "temperature": 22.1 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "thermostat": { + "lower_bound": 4.0, + "resolution": 0.1, + "setpoint_high": 30.0, + "setpoint_low": 20.5, + "upper_bound": 30.0 + }, + "vendor": "Plugwise" + }, + "9ff0569b4984459fb243af64c0901894": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "4.3.8", + "hardware": "AME Smile 2.0 board", + "location": "674b657c138a41a291d315d7471deb06", + "mac_address": "C493000278E2", + "model": "Gateway", + "model_id": "smile_thermo", + "name": "Smile Anna", + "notifications": {}, + "sensors": { + "outdoor_temperature": 15.5 + }, + "vendor": "Plugwise" + }, + "bfb5ee0a88e14e5f97bfa725a760cc49": { + "available": true, + "binary_sensors": { + "cooling_enabled": false, + "cooling_state": false, + "dhw_state": false, + "flame_state": false, + "heating_state": false + }, + "dev_class": "heater_central", + "dhw_modes": ["off", "auto", "boost", "eco", "comfort"], + "location": "674b657c138a41a291d315d7471deb06", + "max_dhw_temperature": { + "lower_bound": 35.0, + "resolution": 0.01, + "setpoint": 53.0, + "upper_bound": 60.0 + }, + "maximum_boiler_temperature": { + "lower_bound": 25.0, + "resolution": 0.01, + "setpoint": 40.0, + "upper_bound": 45.0 + }, + "model": "Generic heater/cooler", + "model_id": "173", + "name": "OpenTherm", + "select_dhw_mode": "auto", + "sensors": { + "dhw_temperature": 52.9, + "intended_boiler_temperature": 0.0, + "modulation_level": 0.0, + "outdoor_air_temperature": 17.2, + "return_temperature": 26.3, + "water_temperature": 25.3 + }, + "switches": { + "cooling_ena_switch": false, + "dhw_cm_switch": true + }, + "vendor": "Atlantic" + } +} diff --git a/fixtures/anna_v4/data.json b/fixtures/anna_v4/data.json new file mode 100644 index 000000000..7e6f138be --- /dev/null +++ b/fixtures/anna_v4/data.json @@ -0,0 +1,88 @@ +{ + "01b85360fdd243d0aaad4d6ac2a5ba7e": { + "active_preset": "home", + "available_schedules": ["Standaard", "Thuiswerken", "off"], + "climate_mode": "heat", + "control_state": "heating", + "dev_class": "thermostat", + "firmware": "2018-02-08T11:15:53+01:00", + "hardware": "6539-1301-5002", + "location": "eb5309212bf5407bb143e5bfa3b18aee", + "model": "ThermoTouch", + "name": "Anna", + "preset_modes": ["vacation", "no_frost", "away", "asleep", "home"], + "select_schedule": "off", + "sensors": { + "illuminance": 60.0, + "setpoint": 20.5, + "temperature": 20.6 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "thermostat": { + "lower_bound": 4.0, + "resolution": 0.1, + "setpoint": 20.5, + "upper_bound": 30.0 + }, + "vendor": "Plugwise" + }, + "0466eae8520144c78afb29628384edeb": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "4.0.15", + "hardware": "AME Smile 2.0 board", + "location": "94c107dc6ac84ed98e9f68c0dd06bf71", + "mac_address": "012345670001", + "model": "Gateway", + "model_id": "smile_thermo", + "name": "Smile Anna", + "notifications": {}, + "sensors": { + "outdoor_temperature": 7.44 + }, + "vendor": "Plugwise" + }, + "cd0e6156b1f04d5f952349ffbe397481": { + "available": true, + "binary_sensors": { + "dhw_state": false, + "flame_state": false, + "heating_state": true + }, + "dev_class": "heater_central", + "location": "94c107dc6ac84ed98e9f68c0dd06bf71", + "max_dhw_temperature": { + "lower_bound": 30.0, + "resolution": 0.01, + "setpoint": 60.0, + "upper_bound": 60.0 + }, + "maximum_boiler_temperature": { + "lower_bound": 0.0, + "resolution": 1.0, + "setpoint": 70.0, + "upper_bound": 100.0 + }, + "model": "Generic heater", + "model_id": "2.32", + "name": "OpenTherm", + "sensors": { + "intended_boiler_temperature": 39.9, + "modulation_level": 0.0, + "return_temperature": 32.0, + "water_pressure": 2.2, + "water_temperature": 45.0 + }, + "switches": { + "dhw_cm_switch": false + }, + "vendor": "Bosch Thermotechniek B.V." + } +} diff --git a/fixtures/anna_v4_dhw/data.json b/fixtures/anna_v4_dhw/data.json new file mode 100644 index 000000000..a560de161 --- /dev/null +++ b/fixtures/anna_v4_dhw/data.json @@ -0,0 +1,88 @@ +{ + "01b85360fdd243d0aaad4d6ac2a5ba7e": { + "active_preset": "home", + "available_schedules": ["Standaard", "Thuiswerken", "off"], + "climate_mode": "heat", + "control_state": "idle", + "dev_class": "thermostat", + "firmware": "2018-02-08T11:15:53+01:00", + "hardware": "6539-1301-5002", + "location": "eb5309212bf5407bb143e5bfa3b18aee", + "model": "ThermoTouch", + "name": "Anna", + "preset_modes": ["vacation", "no_frost", "away", "asleep", "home"], + "select_schedule": "off", + "sensors": { + "illuminance": 60.0, + "setpoint": 20.5, + "temperature": 20.6 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "thermostat": { + "lower_bound": 4.0, + "resolution": 0.1, + "setpoint": 20.5, + "upper_bound": 30.0 + }, + "vendor": "Plugwise" + }, + "0466eae8520144c78afb29628384edeb": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "4.0.15", + "hardware": "AME Smile 2.0 board", + "location": "94c107dc6ac84ed98e9f68c0dd06bf71", + "mac_address": "012345670001", + "model": "Gateway", + "model_id": "smile_thermo", + "name": "Smile Anna", + "notifications": {}, + "sensors": { + "outdoor_temperature": 7.44 + }, + "vendor": "Plugwise" + }, + "cd0e6156b1f04d5f952349ffbe397481": { + "available": true, + "binary_sensors": { + "dhw_state": true, + "flame_state": true, + "heating_state": false + }, + "dev_class": "heater_central", + "location": "94c107dc6ac84ed98e9f68c0dd06bf71", + "max_dhw_temperature": { + "lower_bound": 30.0, + "resolution": 0.01, + "setpoint": 60.0, + "upper_bound": 60.0 + }, + "maximum_boiler_temperature": { + "lower_bound": 0.0, + "resolution": 1.0, + "setpoint": 70.0, + "upper_bound": 100.0 + }, + "model": "Generic heater", + "model_id": "2.32", + "name": "OpenTherm", + "sensors": { + "intended_boiler_temperature": 39.9, + "modulation_level": 0.0, + "return_temperature": 32.0, + "water_pressure": 2.2, + "water_temperature": 45.0 + }, + "switches": { + "dhw_cm_switch": false + }, + "vendor": "Bosch Thermotechniek B.V." + } +} diff --git a/fixtures/anna_v4_no_tag/data.json b/fixtures/anna_v4_no_tag/data.json new file mode 100644 index 000000000..513e7ce20 --- /dev/null +++ b/fixtures/anna_v4_no_tag/data.json @@ -0,0 +1,88 @@ +{ + "01b85360fdd243d0aaad4d6ac2a5ba7e": { + "active_preset": "home", + "available_schedules": ["Standaard", "Thuiswerken", "off"], + "climate_mode": "auto", + "control_state": "heating", + "dev_class": "thermostat", + "firmware": "2018-02-08T11:15:53+01:00", + "hardware": "6539-1301-5002", + "location": "eb5309212bf5407bb143e5bfa3b18aee", + "model": "ThermoTouch", + "name": "Anna", + "preset_modes": ["vacation", "no_frost", "away", "asleep", "home"], + "select_schedule": "Thuiswerken", + "sensors": { + "illuminance": 60.0, + "setpoint": 20.5, + "temperature": 20.6 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "thermostat": { + "lower_bound": 4.0, + "resolution": 0.1, + "setpoint": 20.5, + "upper_bound": 30.0 + }, + "vendor": "Plugwise" + }, + "0466eae8520144c78afb29628384edeb": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "4.0.15", + "hardware": "AME Smile 2.0 board", + "location": "94c107dc6ac84ed98e9f68c0dd06bf71", + "mac_address": "012345670001", + "model": "Gateway", + "model_id": "smile_thermo", + "name": "Smile Anna", + "notifications": {}, + "sensors": { + "outdoor_temperature": 7.44 + }, + "vendor": "Plugwise" + }, + "cd0e6156b1f04d5f952349ffbe397481": { + "available": true, + "binary_sensors": { + "dhw_state": false, + "flame_state": false, + "heating_state": true + }, + "dev_class": "heater_central", + "location": "94c107dc6ac84ed98e9f68c0dd06bf71", + "max_dhw_temperature": { + "lower_bound": 30.0, + "resolution": 0.01, + "setpoint": 60.0, + "upper_bound": 60.0 + }, + "maximum_boiler_temperature": { + "lower_bound": 0.0, + "resolution": 1.0, + "setpoint": 70.0, + "upper_bound": 100.0 + }, + "model": "Generic heater", + "model_id": "2.32", + "name": "OpenTherm", + "sensors": { + "intended_boiler_temperature": 39.9, + "modulation_level": 0.0, + "return_temperature": 32.0, + "water_pressure": 2.2, + "water_temperature": 45.0 + }, + "switches": { + "dhw_cm_switch": false + }, + "vendor": "Bosch Thermotechniek B.V." + } +} diff --git a/fixtures/anna_without_boiler_fw441/data.json b/fixtures/anna_without_boiler_fw441/data.json new file mode 100644 index 000000000..7e0b7cc4f --- /dev/null +++ b/fixtures/anna_without_boiler_fw441/data.json @@ -0,0 +1,61 @@ +{ + "7ffbb3ab4b6c4ab2915d7510f7bf8fe9": { + "active_preset": "home", + "available_schedules": ["Test", "Normaal", "off"], + "climate_mode": "auto", + "control_state": "idle", + "dev_class": "thermostat", + "firmware": "2018-02-08T11:15:53+01:00", + "hardware": "6539-1301-5002", + "location": "c34c6864216446528e95d88985e714cc", + "model": "ThermoTouch", + "name": "Anna", + "preset_modes": ["no_frost", "asleep", "away", "vacation", "home"], + "select_schedule": "Normaal", + "sensors": { + "illuminance": 0.25, + "setpoint": 19.0, + "temperature": 19.1 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "thermostat": { + "lower_bound": 4.0, + "resolution": 0.1, + "setpoint": 19.0, + "upper_bound": 30.0 + }, + "vendor": "Plugwise" + }, + "a270735e4ccd45239424badc0578a2b1": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "4.4.1", + "hardware": "AME Smile 2.0 board", + "location": "0f4f2ada20734a339fe353348fe87b96", + "mac_address": "D40FB200FA1C", + "model": "Gateway", + "model_id": "smile_thermo", + "name": "Smile Anna", + "notifications": {}, + "sensors": { + "outdoor_temperature": 8.31 + }, + "vendor": "Plugwise" + }, + "c46b4794d28149699eacf053deedd003": { + "binary_sensors": { + "heating_state": false + }, + "dev_class": "heater_central", + "location": "0f4f2ada20734a339fe353348fe87b96", + "model": "Unknown", + "name": "OnOff" + } +} diff --git a/fixtures/legacy_anna/data.json b/fixtures/legacy_anna/data.json new file mode 100644 index 000000000..cc7e66fb1 --- /dev/null +++ b/fixtures/legacy_anna/data.json @@ -0,0 +1,60 @@ +{ + "0000aaaa0000aaaa0000aaaa0000aa00": { + "dev_class": "gateway", + "firmware": "1.8.22", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "mac_address": "01:23:45:67:89:AB", + "model": "Gateway", + "name": "Smile Anna", + "vendor": "Plugwise" + }, + "04e4cbfe7f4340f090f85ec3b9e6a950": { + "binary_sensors": { + "flame_state": true, + "heating_state": true + }, + "dev_class": "heater_central", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "maximum_boiler_temperature": { + "lower_bound": 50.0, + "resolution": 1.0, + "setpoint": 50.0, + "upper_bound": 90.0 + }, + "model": "Generic heater", + "name": "OpenTherm", + "sensors": { + "dhw_temperature": 51.2, + "intended_boiler_temperature": 17.0, + "modulation_level": 0.0, + "return_temperature": 21.7, + "water_pressure": 1.2, + "water_temperature": 23.6 + }, + "vendor": "Bosch Thermotechniek B.V." + }, + "0d266432d64443e283b5d708ae98b455": { + "active_preset": "home", + "climate_mode": "heat", + "control_state": "heating", + "dev_class": "thermostat", + "firmware": "2017-03-13T11:54:58+01:00", + "hardware": "6539-1301-500", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "ThermoTouch", + "name": "Anna", + "preset_modes": ["away", "vacation", "asleep", "home", "no_frost"], + "sensors": { + "illuminance": 150.8, + "setpoint": 20.5, + "temperature": 20.4 + }, + "thermostat": { + "lower_bound": 4.0, + "resolution": 0.1, + "setpoint": 20.5, + "upper_bound": 30.0 + }, + "vendor": "Plugwise" + } +} diff --git a/fixtures/legacy_anna_2/data.json b/fixtures/legacy_anna_2/data.json new file mode 100644 index 000000000..5f1ef01f9 --- /dev/null +++ b/fixtures/legacy_anna_2/data.json @@ -0,0 +1,64 @@ +{ + "9e7377867dc24e51b8098a5ba02bd89d": { + "active_preset": null, + "available_schedules": ["Thermostat schedule", "off"], + "climate_mode": "heat", + "control_state": "idle", + "dev_class": "thermostat", + "firmware": "2017-03-13T11:54:58+01:00", + "hardware": "6539-1301-5002", + "location": "be81e3f8275b4129852c4d8d550ae2eb", + "model": "ThermoTouch", + "name": "Anna", + "preset_modes": ["vacation", "away", "no_frost", "home", "asleep"], + "select_schedule": "off", + "sensors": { + "illuminance": 19.5, + "setpoint": 15.0, + "temperature": 21.4 + }, + "thermostat": { + "lower_bound": 4.0, + "resolution": 0.1, + "setpoint": 15.0, + "upper_bound": 30.0 + }, + "vendor": "Plugwise" + }, + "be81e3f8275b4129852c4d8d550ae2eb": { + "dev_class": "gateway", + "firmware": "1.8.22", + "location": "be81e3f8275b4129852c4d8d550ae2eb", + "mac_address": "01:23:45:67:89:AB", + "model": "Gateway", + "name": "Smile Anna", + "sensors": { + "outdoor_temperature": 21.0 + }, + "vendor": "Plugwise" + }, + "ea5d8a7177e541b0a4b52da815166de4": { + "binary_sensors": { + "flame_state": false, + "heating_state": false + }, + "dev_class": "heater_central", + "location": "be81e3f8275b4129852c4d8d550ae2eb", + "maximum_boiler_temperature": { + "lower_bound": 50.0, + "resolution": 1.0, + "setpoint": 70.0, + "upper_bound": 90.0 + }, + "model": "Generic heater", + "name": "OpenTherm", + "sensors": { + "dhw_temperature": 0.0, + "intended_boiler_temperature": 0.0, + "modulation_level": 0.0, + "return_temperature": 0.0, + "water_pressure": 1.7, + "water_temperature": 54.0 + } + } +} diff --git a/fixtures/p1v4_442_single/data.json b/fixtures/p1v4_442_single/data.json new file mode 100644 index 000000000..6dfcd7ee0 --- /dev/null +++ b/fixtures/p1v4_442_single/data.json @@ -0,0 +1,43 @@ +{ + "a455b61e52394b2db5081ce025a430f3": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "4.4.2", + "hardware": "AME Smile 2.0 board", + "location": "a455b61e52394b2db5081ce025a430f3", + "mac_address": "012345670001", + "model": "Gateway", + "model_id": "smile", + "name": "Smile P1", + "notifications": {}, + "vendor": "Plugwise" + }, + "ba4de7613517478da82dd9b6abea36af": { + "available": true, + "dev_class": "smartmeter", + "location": "a455b61e52394b2db5081ce025a430f3", + "model": "KFM5KAIFA-METER", + "name": "P1", + "sensors": { + "electricity_consumed_off_peak_cumulative": 17643.423, + "electricity_consumed_off_peak_interval": 15, + "electricity_consumed_off_peak_point": 486, + "electricity_consumed_peak_cumulative": 13966.608, + "electricity_consumed_peak_interval": 0, + "electricity_consumed_peak_point": 0, + "electricity_phase_one_consumed": 486, + "electricity_phase_one_produced": 0, + "electricity_produced_off_peak_cumulative": 0.0, + "electricity_produced_off_peak_interval": 0, + "electricity_produced_off_peak_point": 0, + "electricity_produced_peak_cumulative": 0.0, + "electricity_produced_peak_interval": 0, + "electricity_produced_peak_point": 0, + "net_electricity_cumulative": 31610.031, + "net_electricity_point": 486 + }, + "vendor": "SHENZHEN KAIFA TECHNOLOGY \uff08CHENGDU\uff09 CO., LTD." + } +} diff --git a/fixtures/p1v4_442_triple/data.json b/fixtures/p1v4_442_triple/data.json new file mode 100644 index 000000000..943325d14 --- /dev/null +++ b/fixtures/p1v4_442_triple/data.json @@ -0,0 +1,56 @@ +{ + "03e65b16e4b247a29ae0d75a78cb492e": { + "binary_sensors": { + "plugwise_notification": true + }, + "dev_class": "gateway", + "firmware": "4.4.2", + "hardware": "AME Smile 2.0 board", + "location": "03e65b16e4b247a29ae0d75a78cb492e", + "mac_address": "012345670001", + "model": "Gateway", + "model_id": "smile", + "name": "Smile P1", + "notifications": { + "97a04c0c263049b29350a660b4cdd01e": { + "warning": "The Smile P1 is not connected to a smart meter." + } + }, + "vendor": "Plugwise" + }, + "b82b6b3322484f2ea4e25e0bd5f3d61f": { + "available": true, + "dev_class": "smartmeter", + "location": "03e65b16e4b247a29ae0d75a78cb492e", + "model": "XMX5LGF0010453051839", + "name": "P1", + "sensors": { + "electricity_consumed_off_peak_cumulative": 70537.898, + "electricity_consumed_off_peak_interval": 314, + "electricity_consumed_off_peak_point": 5553, + "electricity_consumed_peak_cumulative": 161328.641, + "electricity_consumed_peak_interval": 0, + "electricity_consumed_peak_point": 0, + "electricity_phase_one_consumed": 1763, + "electricity_phase_one_produced": 0, + "electricity_phase_three_consumed": 2080, + "electricity_phase_three_produced": 0, + "electricity_phase_two_consumed": 1703, + "electricity_phase_two_produced": 0, + "electricity_produced_off_peak_cumulative": 0.0, + "electricity_produced_off_peak_interval": 0, + "electricity_produced_off_peak_point": 0, + "electricity_produced_peak_cumulative": 0.0, + "electricity_produced_peak_interval": 0, + "electricity_produced_peak_point": 0, + "gas_consumed_cumulative": 16811.37, + "gas_consumed_interval": 0.06, + "net_electricity_cumulative": 231866.539, + "net_electricity_point": 5553, + "voltage_phase_one": 233.2, + "voltage_phase_three": 234.7, + "voltage_phase_two": 234.4 + }, + "vendor": "XEMEX NV" + } +} diff --git a/fixtures/smile_p1_v2/data.json b/fixtures/smile_p1_v2/data.json new file mode 100644 index 000000000..768dd2c23 --- /dev/null +++ b/fixtures/smile_p1_v2/data.json @@ -0,0 +1,34 @@ +{ + "938696c4bcdb4b8a9a595cb38ed43913": { + "dev_class": "smartmeter", + "location": "938696c4bcdb4b8a9a595cb38ed43913", + "model": "Ene5\\T210-DESMR5.0", + "name": "P1", + "sensors": { + "electricity_consumed_off_peak_cumulative": 1642.74, + "electricity_consumed_off_peak_interval": 0, + "electricity_consumed_peak_cumulative": 1155.195, + "electricity_consumed_peak_interval": 250, + "electricity_consumed_point": 458, + "electricity_produced_off_peak_cumulative": 482.598, + "electricity_produced_off_peak_interval": 0, + "electricity_produced_peak_cumulative": 1296.136, + "electricity_produced_peak_interval": 0, + "electricity_produced_point": 0, + "gas_consumed_cumulative": 584.433, + "gas_consumed_interval": 0.016, + "net_electricity_cumulative": 1019.201, + "net_electricity_point": 458 + }, + "vendor": "Ene5\\T210-DESMR5.0" + }, + "aaaa0000aaaa0000aaaa0000aaaa00aa": { + "dev_class": "gateway", + "firmware": "2.5.9", + "location": "938696c4bcdb4b8a9a595cb38ed43913", + "mac_address": "012345670001", + "model": "Gateway", + "name": "Smile P1", + "vendor": "Plugwise" + } +} diff --git a/fixtures/smile_p1_v2_2/data.json b/fixtures/smile_p1_v2_2/data.json new file mode 100644 index 000000000..85931be4c --- /dev/null +++ b/fixtures/smile_p1_v2_2/data.json @@ -0,0 +1,34 @@ +{ + "199aa40f126840f392983d171374ab0b": { + "dev_class": "smartmeter", + "location": "199aa40f126840f392983d171374ab0b", + "model": "Ene5\\T210-DESMR5.0", + "name": "P1", + "sensors": { + "electricity_consumed_off_peak_cumulative": 1642.74, + "electricity_consumed_off_peak_interval": 0, + "electricity_consumed_peak_cumulative": 1155.195, + "electricity_consumed_peak_interval": 250, + "electricity_consumed_point": 458, + "electricity_produced_off_peak_cumulative": 482.598, + "electricity_produced_off_peak_interval": 0, + "electricity_produced_peak_cumulative": 1296.136, + "electricity_produced_peak_interval": 0, + "electricity_produced_point": 0, + "gas_consumed_cumulative": 584.433, + "gas_consumed_interval": 0.016, + "net_electricity_cumulative": 1019.201, + "net_electricity_point": 458 + }, + "vendor": "Ene5\\T210-DESMR5.0" + }, + "aaaa0000aaaa0000aaaa0000aaaa00aa": { + "dev_class": "gateway", + "firmware": "2.5.9", + "location": "199aa40f126840f392983d171374ab0b", + "mac_address": "012345670001", + "model": "Gateway", + "name": "Smile P1", + "vendor": "Plugwise" + } +} diff --git a/fixtures/stretch_v23/data.json b/fixtures/stretch_v23/data.json new file mode 100644 index 000000000..0516e1436 --- /dev/null +++ b/fixtures/stretch_v23/data.json @@ -0,0 +1,354 @@ +{ + "0000aaaa0000aaaa0000aaaa0000aa00": { + "dev_class": "gateway", + "firmware": "2.3.12", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "mac_address": "01:23:45:67:89:AB", + "model": "Gateway", + "name": "Stretch", + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670101" + }, + "09c8ce93d7064fa6a233c0e4c2449bfe": { + "dev_class": "lamp", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "0000-0440-0107", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "kerstboom buiten 043B016", + "sensors": { + "electricity_consumed": 0.0, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0 + }, + "switches": { + "lock": false, + "relay": false + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A01" + }, + "199fd4b2caa44197aaf5b3128f6464ed": { + "dev_class": "airconditioner", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "6539-0701-4026", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "Airco 25F69E3", + "sensors": { + "electricity_consumed": 2.06, + "electricity_consumed_interval": 1.62, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A10" + }, + "24b2ed37c8964c73897db6340a39c129": { + "dev_class": "router", + "firmware": "2011-06-27T10:47:37+02:00", + "hardware": "6539-0700-7325", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle+ type F", + "name": "MK Netwerk 1A4455E", + "sensors": { + "electricity_consumed": 4.63, + "electricity_consumed_interval": 0.65, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": true, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "0123456789AB" + }, + "2587a7fcdd7e482dab03fda256076b4b": { + "dev_class": "zz_misc", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "0000-0440-0107", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "00469CA1", + "sensors": { + "electricity_consumed": 0.0, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A16" + }, + "2cc9a0fe70ef4441a9e4f55dfd64b776": { + "dev_class": "lamp", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "6539-0701-4026", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "Lamp TV 025F698F", + "sensors": { + "electricity_consumed": 4.0, + "electricity_consumed_interval": 0.58, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A15" + }, + "305452ce97c243c0a7b4ab2a4ebfe6e3": { + "dev_class": "lamp", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "6539-0701-4026", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "Lamp piano 025F6819", + "sensors": { + "electricity_consumed": 0.0, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": false + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A05" + }, + "33a1c784a9ff4c2d8766a0212714be09": { + "dev_class": "lighting", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "6539-0701-4026", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "Barverlichting", + "sensors": { + "electricity_consumed": 0.0, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": false + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A13" + }, + "407aa1c1099d463c9137a3a9eda787fd": { + "dev_class": "zz_misc", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "0000-0440-0107", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "0043B013", + "sensors": { + "electricity_consumed": 0.0, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0 + }, + "switches": { + "lock": false, + "relay": false + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A09" + }, + "6518f3f72a82486c97b91e26f2e9bd1d": { + "dev_class": "charger", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "6539-0701-4026", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "Bed 025F6768", + "sensors": { + "electricity_consumed": 0.0, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A14" + }, + "713427748874454ca1eb4488d7919cf2": { + "dev_class": "freezer", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "0000-0440-0107", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "Leeg 043220D", + "sensors": { + "electricity_consumed": 0.0, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0 + }, + "switches": { + "lock": false, + "relay": false + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A12" + }, + "71e3e65ffc5a41518b19460c6e8ee34f": { + "dev_class": "tv", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "0000-0440-0107", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "Leeg 043AEC6", + "sensors": { + "electricity_consumed": 0.0, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0 + }, + "switches": { + "lock": false, + "relay": false + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A08" + }, + "828f6ce1e36744689baacdd6ddb1d12c": { + "dev_class": "washingmachine", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "0000-0440-0107", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "Wasmachine 043AEC7", + "sensors": { + "electricity_consumed": 3.5, + "electricity_consumed_interval": 0.5, + "electricity_produced": 0.0 + }, + "switches": { + "lock": true, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A02" + }, + "a28e6f5afc0e4fc68498c1f03e82a052": { + "dev_class": "lamp", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "6539-0701-4026", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "Lamp bank 25F67F8", + "sensors": { + "electricity_consumed": 4.19, + "electricity_consumed_interval": 0.62, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A03" + }, + "bc0adbebc50d428d9444a5d805c89da9": { + "dev_class": "watercooker", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "0000-0440-0107", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "Waterkoker 043AF7F", + "sensors": { + "electricity_consumed": 0.0, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A07" + }, + "c71f1cb2100b42ca942f056dcb7eb01f": { + "dev_class": "tv", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "6539-0701-4026", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "Tv hoek 25F6790", + "sensors": { + "electricity_consumed": 33.3, + "electricity_consumed_interval": 4.93, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A11" + }, + "f7b145c8492f4dd7a4de760456fdef3e": { + "dev_class": "switching", + "members": ["407aa1c1099d463c9137a3a9eda787fd"], + "model": "Switchgroup", + "name": "Test", + "switches": { + "relay": false + }, + "vendor": "Plugwise" + }, + "fd1b74f59e234a9dae4e23b2b5cf07ed": { + "dev_class": "dryer", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "0000-0440-0107", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "Wasdroger 043AECA", + "sensors": { + "electricity_consumed": 1.31, + "electricity_consumed_interval": 0.21, + "electricity_produced": 0.0 + }, + "switches": { + "lock": true, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A04" + }, + "fead900a56d3430bb2d53d891f7c0656": { + "dev_class": "heater_central_plug", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "6539-0701-4026", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "CV-ketel 25F6789", + "sensors": { + "electricity_consumed": 1.56, + "electricity_consumed_interval": 0.04, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": true, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A06" + } +} diff --git a/fixtures/stretch_v27_no_domain/data.json b/fixtures/stretch_v27_no_domain/data.json new file mode 100644 index 000000000..c22e6e043 --- /dev/null +++ b/fixtures/stretch_v27_no_domain/data.json @@ -0,0 +1,272 @@ +{ + "0000aaaa0000aaaa0000aaaa0000aa00": { + "dev_class": "gateway", + "firmware": "2.7.18", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "mac_address": "01:23:45:67:89:AB", + "model": "Gateway", + "name": "Stretch", + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670101" + }, + "0b078d5862614880bc670cabf9f54b4e": { + "dev_class": "zz_misc", + "firmware": "2011-05-13T09:19:23+02:00", + "hardware": "6539-0701-4023", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "769C03", + "sensors": { + "electricity_consumed": 0.0, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A01" + }, + "3b729c63ca41421b9e21264adfa0a4e7": { + "dev_class": "zz_misc", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "6539-0701-4026", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "261B34C", + "sensors": { + "electricity_consumed": 8.5, + "electricity_consumed_interval": 5.19, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A06" + }, + "4661019bbe7b4a3bbe39f345ca5b5d98": { + "dev_class": "zz_misc", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "6539-0701-4026", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "25F68CC", + "sensors": { + "electricity_consumed": 0.0, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A02" + }, + "553dfa416df94802851de32913f1ebd3": { + "dev_class": "zz_misc", + "firmware": "2011-05-13T09:19:23+02:00", + "hardware": "6539-0701-4023", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "B7DEED", + "sensors": { + "electricity_consumed": 2.5, + "electricity_consumed_interval": 1.66, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A09" + }, + "5ee135e752034ad2a3e38a407332757f": { + "dev_class": "zz_misc", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "6539-0701-4026", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "261B329", + "sensors": { + "electricity_consumed": 6.75, + "electricity_consumed_interval": 3.98, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A03" + }, + "7c7f0d3da801402291b057f9ec69b5b6": { + "dev_class": "zz_misc", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "6539-0701-4026", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "261B34D", + "sensors": { + "electricity_consumed": 7.81, + "electricity_consumed_interval": 4.54, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A08" + }, + "8b8d14b242e24cd789743c828b9a2ea9": { + "dev_class": "zz_misc", + "firmware": "2011-05-13T09:19:23+02:00", + "hardware": "6539-0701-4022", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "76BF93", + "sensors": { + "electricity_consumed": 1.69, + "electricity_consumed_interval": 1.14, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A05" + }, + "8e4ecdcc9094481387e0273437bb51f9": { + "dev_class": "zz_misc", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "6539-0701-4026", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "25F68C3", + "sensors": { + "electricity_consumed": 4.69, + "electricity_consumed_interval": 2.83, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A07" + }, + "9b9bfdb3c7ad4ca5817ccaa235f1e094": { + "dev_class": "zz_misc", + "firmware": "2011-06-27T10:47:37+02:00", + "hardware": "6539-0700-7326", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle+ type F", + "name": "25881A2", + "sensors": { + "electricity_consumed": 13.3, + "electricity_consumed_interval": 7.77, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": true, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A04" + }, + "9db23f92fd114e83acce036b6cb82295": { + "dev_class": "zz_misc", + "firmware": "2011-05-13T09:19:23+02:00", + "hardware": "6539-0701-4023", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "76B2F2", + "sensors": { + "electricity_consumed": 0.63, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A13" + }, + "ad858f416f3e42e6a25bbd6b18178b0e": { + "dev_class": "zz_misc", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "6539-0701-4026", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "261B2AE", + "sensors": { + "electricity_consumed": 6.06, + "electricity_consumed_interval": 3.41, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A12" + }, + "d0122ac66eba47b99d8e5fbd1e2f5932": { + "dev_class": "zz_misc", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "6539-0701-4026", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "25F66AD", + "sensors": { + "electricity_consumed": 3.88, + "electricity_consumed_interval": 2.21, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A10" + }, + "e4172142264f488a99b63c73817c9d21": { + "dev_class": "zz_misc", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "6539-0701-4026", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "261B32A", + "sensors": { + "electricity_consumed": 9.63, + "electricity_consumed_interval": 5.84, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A11" + } +} diff --git a/fixtures/stretch_v31/data.json b/fixtures/stretch_v31/data.json new file mode 100644 index 000000000..250839d08 --- /dev/null +++ b/fixtures/stretch_v31/data.json @@ -0,0 +1,136 @@ +{ + "0000aaaa0000aaaa0000aaaa0000aa00": { + "dev_class": "gateway", + "firmware": "3.1.11", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "mac_address": "01:23:45:67:89:AB", + "model": "Gateway", + "name": "Stretch", + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670101" + }, + "059e4d03c7a34d278add5c7a4a781d19": { + "dev_class": "washingmachine", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "0000-0440-0107", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "Wasmachine (52AC1)", + "sensors": { + "electricity_consumed": 0.0, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0 + }, + "switches": { + "lock": true, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A01" + }, + "5871317346d045bc9f6b987ef25ee638": { + "dev_class": "water_heater_vessel", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "6539-0701-4028", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "Boiler (1EB31)", + "sensors": { + "electricity_consumed": 1.19, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A07" + }, + "aac7b735042c4832ac9ff33aae4f453b": { + "dev_class": "dishwasher", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "6539-0701-4022", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "Vaatwasser (2a1ab)", + "sensors": { + "electricity_consumed": 0.0, + "electricity_consumed_interval": 0.71, + "electricity_produced": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A02" + }, + "cfe95cf3de1948c0b8955125bf754614": { + "dev_class": "dryer", + "firmware": "2011-06-27T10:52:18+02:00", + "hardware": "0000-0440-0107", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle type F", + "name": "Droger (52559)", + "sensors": { + "electricity_consumed": 0.0, + "electricity_consumed_interval": 0.0, + "electricity_produced": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A04" + }, + "d03738edfcc947f7b8f4573571d90d2d": { + "dev_class": "switching", + "members": [ + "059e4d03c7a34d278add5c7a4a781d19", + "cfe95cf3de1948c0b8955125bf754614" + ], + "model": "Switchgroup", + "name": "Schakel", + "switches": { + "relay": true + }, + "vendor": "Plugwise" + }, + "d950b314e9d8499f968e6db8d82ef78c": { + "dev_class": "report", + "members": [ + "059e4d03c7a34d278add5c7a4a781d19", + "5871317346d045bc9f6b987ef25ee638", + "aac7b735042c4832ac9ff33aae4f453b", + "cfe95cf3de1948c0b8955125bf754614", + "e1c884e7dede431dadee09506ec4f859" + ], + "model": "Switchgroup", + "name": "Stroomvreters", + "switches": { + "relay": true + }, + "vendor": "Plugwise" + }, + "e1c884e7dede431dadee09506ec4f859": { + "dev_class": "refrigerator", + "firmware": "2011-06-27T10:47:37+02:00", + "hardware": "6539-0700-7330", + "location": "0000aaaa0000aaaa0000aaaa0000aa00", + "model": "Circle+ type F", + "name": "Koelkast (92C4A)", + "sensors": { + "electricity_consumed": 50.5, + "electricity_consumed_interval": 0.08, + "electricity_produced": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "0123456789AB" + } +} From 8fdbcb191b066eb01187ea68a498c3d3a40d3f04 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 20 Jan 2025 20:09:25 +0100 Subject: [PATCH 35/66] Rework manual_fixtures-script --- scripts/manual_fixtures.py | 178 ++++++++++++++++++------------------- 1 file changed, 89 insertions(+), 89 deletions(-) diff --git a/scripts/manual_fixtures.py b/scripts/manual_fixtures.py index f69920aae..8cdc4fb24 100755 --- a/scripts/manual_fixtures.py +++ b/scripts/manual_fixtures.py @@ -5,14 +5,14 @@ import os -def json_writer(manual_name: str, all_data: dict) -> None: +def json_writer(manual_name: str, output: dict) -> None: """Standardized writing json files.""" if not os.path.exists(f"./fixtures/{manual_name}"): os.makedirs(f"./fixtures/{manual_name}") - outfile = f"./fixtures/{manual_name}/all_data.json" + outfile = f"./fixtures/{manual_name}/data.json" data = json.dumps( - all_data, + output, indent=2, separators=(",", ": "), sort_keys=True, @@ -28,7 +28,7 @@ def json_writer(manual_name: str, all_data: dict) -> None: # Modified Adam fixtures base_adam_manual = "adam_multiple_devices_per_zone" -basefile = f"./fixtures/{base_adam_manual}/all_data.json" +basefile = f"./fixtures/{base_adam_manual}/data.json" io = open(basefile) base = json.load(io) @@ -36,13 +36,13 @@ def json_writer(manual_name: str, all_data: dict) -> None: adam_multiple_devices_per_zone = base.copy() # Change schedule to not present for "446ac08dd04d4eff8ac57489757b7314" -adam_multiple_devices_per_zone["devices"]["446ac08dd04d4eff8ac57489757b7314"].pop("available_schedules") -adam_multiple_devices_per_zone["devices"]["446ac08dd04d4eff8ac57489757b7314"].pop("select_schedule") +adam_multiple_devices_per_zone["446ac08dd04d4eff8ac57489757b7314"].pop("available_schedules") +adam_multiple_devices_per_zone["446ac08dd04d4eff8ac57489757b7314"].pop("select_schedule") json_writer("m_adam_multiple_devices_per_zone", adam_multiple_devices_per_zone) base_adam_manual = "adam_jip" -basefile = f"./fixtures/{base_adam_manual}/all_data.json" +basefile = f"./fixtures/{base_adam_manual}/data.json" io = open(basefile) base = json.load(io) @@ -50,9 +50,9 @@ def json_writer(manual_name: str, all_data: dict) -> None: adam_jip = base.copy() # Change mode to off for "06aecb3d00354375924f50c47af36bd2" for testcoverage in HA Core -adam_jip["devices"]["06aecb3d00354375924f50c47af36bd2"]["climate_mode"] = "off" +adam_jip["06aecb3d00354375924f50c47af36bd2"]["climate_mode"] = "off" # Remove control_state for testcoverage of missing control_state in HA Core -adam_jip["devices"]["06aecb3d00354375924f50c47af36bd2"].pop("control_state") +adam_jip["06aecb3d00354375924f50c47af36bd2"].pop("control_state") json_writer("m_adam_jip", adam_jip) @@ -60,7 +60,7 @@ def json_writer(manual_name: str, all_data: dict) -> None: ### Manual Adam fixtures base_adam_manual = "adam_plus_anna_new" -basefile = f"./fixtures/{base_adam_manual}/all_data.json" +basefile = f"./fixtures/{base_adam_manual}/data.json" io = open(basefile) base = json.load(io) @@ -68,91 +68,91 @@ def json_writer(manual_name: str, all_data: dict) -> None: m_adam_cooling = base.copy() # Remove devices 67d73d0bd469422db25a618a5fb8eeb0, 29542b2b6a6a4169acecc15c72a599b8 and 10016900610d4c7481df78c89606ef22 from anywhere -m_adam_cooling["devices"].pop("29542b2b6a6a4169acecc15c72a599b8") -m_adam_cooling["devices"].pop("67d73d0bd469422db25a618a5fb8eeb0") -m_adam_cooling["devices"].pop("10016900610d4c7481df78c89606ef22") +m_adam_cooling.pop("29542b2b6a6a4169acecc15c72a599b8") +m_adam_cooling.pop("67d73d0bd469422db25a618a5fb8eeb0") +m_adam_cooling.pop("10016900610d4c7481df78c89606ef22") # Correct setpoint for device "ad4838d7d35c4d6ea796ee12ae5aedf8" and zone "f2bf9048bef64cc5b6d5110154e33c81" -m_adam_cooling["devices"]["ad4838d7d35c4d6ea796ee12ae5aedf8"]["sensors"][ +m_adam_cooling["ad4838d7d35c4d6ea796ee12ae5aedf8"]["sensors"][ "setpoint" ] = 23.5 -m_adam_cooling["devices"]["ad4838d7d35c4d6ea796ee12ae5aedf8"]["sensors"][ +m_adam_cooling["ad4838d7d35c4d6ea796ee12ae5aedf8"]["sensors"][ "temperature" ] = 25.8 -m_adam_cooling["devices"]["f2bf9048bef64cc5b6d5110154e33c81"]["thermostat"][ +m_adam_cooling["f2bf9048bef64cc5b6d5110154e33c81"]["thermostat"][ "setpoint" ] = 23.5 -m_adam_cooling["devices"]["f2bf9048bef64cc5b6d5110154e33c81"]["sensors"][ +m_adam_cooling["f2bf9048bef64cc5b6d5110154e33c81"]["sensors"][ "temperature" ] = 25.8 -m_adam_cooling["devices"]["f2bf9048bef64cc5b6d5110154e33c81"][ +m_adam_cooling["f2bf9048bef64cc5b6d5110154e33c81"][ "select_schedule" ] = "off" -m_adam_cooling["devices"]["f2bf9048bef64cc5b6d5110154e33c81"][ +m_adam_cooling["f2bf9048bef64cc5b6d5110154e33c81"][ "control_state" ] = "cooling" -m_adam_cooling["devices"]["f2bf9048bef64cc5b6d5110154e33c81"]["climate_mode"] = "cool" +m_adam_cooling["f2bf9048bef64cc5b6d5110154e33c81"]["climate_mode"] = "cool" # Add new key available -m_adam_cooling["devices"]["ad4838d7d35c4d6ea796ee12ae5aedf8"]["available"] = True +m_adam_cooling["ad4838d7d35c4d6ea796ee12ae5aedf8"]["available"] = True # (again, following diff) # Remove device "2568cc4b9c1e401495d4741a5f89bee1" from anywhere -m_adam_cooling["devices"].pop("2568cc4b9c1e401495d4741a5f89bee1") +m_adam_cooling.pop("2568cc4b9c1e401495d4741a5f89bee1") # Remove device "854f8a9b0e7e425db97f1f110e1ce4b3" from anywhere -m_adam_cooling["devices"].pop("854f8a9b0e7e425db97f1f110e1ce4b3") +m_adam_cooling.pop("854f8a9b0e7e425db97f1f110e1ce4b3") # Go for 1772 -m_adam_cooling["devices"]["1772a4ea304041adb83f357b751341ff"]["sensors"][ +m_adam_cooling["1772a4ea304041adb83f357b751341ff"]["sensors"][ "temperature" ] = 21.6 # Go for e2f4 -m_adam_cooling["devices"]["e2f4322d57924fa090fbbc48b3a140dc"]["sensors"][ +m_adam_cooling["e2f4322d57924fa090fbbc48b3a140dc"]["sensors"][ "setpoint" ] = 23.5 -m_adam_cooling["devices"]["e2f4322d57924fa090fbbc48b3a140dc"]["sensors"][ +m_adam_cooling["e2f4322d57924fa090fbbc48b3a140dc"]["sensors"][ "temperature" ] = 23.9 -m_adam_cooling["devices"]["f871b8c4d63549319221e294e4f88074"]["thermostat"][ +m_adam_cooling["f871b8c4d63549319221e294e4f88074"]["thermostat"][ "setpoint" ] = 25.0 -m_adam_cooling["devices"]["f871b8c4d63549319221e294e4f88074"]["sensors"][ +m_adam_cooling["f871b8c4d63549319221e294e4f88074"]["sensors"][ "temperature" ] = 23.9 -m_adam_cooling["devices"]["f871b8c4d63549319221e294e4f88074"][ +m_adam_cooling["f871b8c4d63549319221e294e4f88074"][ "control_state" ] = "cooling" -m_adam_cooling["devices"]["f871b8c4d63549319221e294e4f88074"]["climate_mode"] = "auto" +m_adam_cooling["f871b8c4d63549319221e294e4f88074"]["climate_mode"] = "auto" # Go for da22 -m_adam_cooling["devices"]["da224107914542988a88561b4452b0f6"][ +m_adam_cooling["da224107914542988a88561b4452b0f6"][ "select_regulation_mode" ] = "cooling" -m_adam_cooling["devices"]["da224107914542988a88561b4452b0f6"][ +m_adam_cooling["da224107914542988a88561b4452b0f6"][ "regulation_modes" ].append("cooling") -m_adam_cooling["devices"]["da224107914542988a88561b4452b0f6"]["sensors"][ +m_adam_cooling["da224107914542988a88561b4452b0f6"]["sensors"][ "outdoor_temperature" ] = 29.65 # Go for 056e -m_adam_cooling["devices"]["056ee145a816487eaa69243c3280f8bf"]["binary_sensors"][ +m_adam_cooling["056ee145a816487eaa69243c3280f8bf"]["binary_sensors"][ "cooling_state" ] = True -m_adam_cooling["devices"]["056ee145a816487eaa69243c3280f8bf"]["binary_sensors"][ +m_adam_cooling["056ee145a816487eaa69243c3280f8bf"]["binary_sensors"][ "heating_state" ] = False -m_adam_cooling["devices"]["056ee145a816487eaa69243c3280f8bf"]["binary_sensors"][ +m_adam_cooling["056ee145a816487eaa69243c3280f8bf"]["binary_sensors"][ "flame_state" ] = False -m_adam_cooling["devices"]["056ee145a816487eaa69243c3280f8bf"]["sensors"][ +m_adam_cooling["056ee145a816487eaa69243c3280f8bf"]["sensors"][ "water_temperature" ] = 19.0 -m_adam_cooling["devices"]["056ee145a816487eaa69243c3280f8bf"]["sensors"][ +m_adam_cooling["056ee145a816487eaa69243c3280f8bf"]["sensors"][ "intended_boiler_temperature" ] = 17.5 @@ -163,77 +163,77 @@ def json_writer(manual_name: str, all_data: dict) -> None: m_adam_heating = m_adam_cooling.copy() # Correct setpoint for "ad4838d7d35c4d6ea796ee12ae5aedf8" -m_adam_heating["devices"]["f2bf9048bef64cc5b6d5110154e33c81"]["thermostat"][ +m_adam_heating["f2bf9048bef64cc5b6d5110154e33c81"]["thermostat"][ "setpoint" ] = 20.0 -m_adam_heating["devices"]["ad4838d7d35c4d6ea796ee12ae5aedf8"]["sensors"][ +m_adam_heating["ad4838d7d35c4d6ea796ee12ae5aedf8"]["sensors"][ "setpoint" ] = 20.0 -m_adam_heating["devices"]["f2bf9048bef64cc5b6d5110154e33c81"]["sensors"][ +m_adam_heating["f2bf9048bef64cc5b6d5110154e33c81"]["sensors"][ "temperature" ] = 19.1 -m_adam_heating["devices"]["ad4838d7d35c4d6ea796ee12ae5aedf8"]["sensors"][ +m_adam_heating["ad4838d7d35c4d6ea796ee12ae5aedf8"]["sensors"][ "temperature" ] = 19.1 -m_adam_heating["devices"]["f2bf9048bef64cc5b6d5110154e33c81"][ +m_adam_heating["f2bf9048bef64cc5b6d5110154e33c81"][ "control_state" ] = "preheating" -m_adam_heating["devices"]["f2bf9048bef64cc5b6d5110154e33c81"]["climate_mode"] = "heat" +m_adam_heating["f2bf9048bef64cc5b6d5110154e33c81"]["climate_mode"] = "heat" # Go for 1772 -m_adam_heating["devices"]["1772a4ea304041adb83f357b751341ff"]["sensors"][ +m_adam_heating["1772a4ea304041adb83f357b751341ff"]["sensors"][ "temperature" ] = 18.6 # Related zone temperature is set below # Go for e2f4 -m_adam_heating["devices"]["f871b8c4d63549319221e294e4f88074"]["thermostat"][ +m_adam_heating["f871b8c4d63549319221e294e4f88074"]["thermostat"][ "setpoint" ] = 15.0 -m_adam_heating["devices"]["e2f4322d57924fa090fbbc48b3a140dc"]["sensors"][ +m_adam_heating["e2f4322d57924fa090fbbc48b3a140dc"]["sensors"][ "setpoint" ] = 15.0 -m_adam_heating["devices"]["f871b8c4d63549319221e294e4f88074"]["sensors"][ +m_adam_heating["f871b8c4d63549319221e294e4f88074"]["sensors"][ "temperature" ] = 17.9 -m_adam_heating["devices"]["e2f4322d57924fa090fbbc48b3a140dc"]["sensors"][ +m_adam_heating["e2f4322d57924fa090fbbc48b3a140dc"]["sensors"][ "temperature" ] = 17.9 -m_adam_heating["devices"]["f871b8c4d63549319221e294e4f88074"]["climate_mode"] = "auto" -m_adam_heating["devices"]["f871b8c4d63549319221e294e4f88074"][ +m_adam_heating["f871b8c4d63549319221e294e4f88074"]["climate_mode"] = "auto" +m_adam_heating["f871b8c4d63549319221e294e4f88074"][ "control_state" ] = "idle" # Go for da22 -m_adam_heating["devices"]["da224107914542988a88561b4452b0f6"][ +m_adam_heating["da224107914542988a88561b4452b0f6"][ "select_regulation_mode" ] = "heating" -m_adam_heating["devices"]["da224107914542988a88561b4452b0f6"][ +m_adam_heating["da224107914542988a88561b4452b0f6"][ "regulation_modes" ].remove("cooling") -m_adam_heating["devices"]["da224107914542988a88561b4452b0f6"]["sensors"][ +m_adam_heating["da224107914542988a88561b4452b0f6"]["sensors"][ "outdoor_temperature" ] = -1.25 # Go for 056e -m_adam_heating["devices"]["056ee145a816487eaa69243c3280f8bf"]["binary_sensors"].pop( +m_adam_heating["056ee145a816487eaa69243c3280f8bf"]["binary_sensors"].pop( "cooling_state" ) -m_adam_heating["devices"]["056ee145a816487eaa69243c3280f8bf"]["binary_sensors"][ +m_adam_heating["056ee145a816487eaa69243c3280f8bf"]["binary_sensors"][ "heating_state" ] = True -m_adam_heating["devices"]["056ee145a816487eaa69243c3280f8bf"]["binary_sensors"][ +m_adam_heating["056ee145a816487eaa69243c3280f8bf"]["binary_sensors"][ "flame_state" ] = False -m_adam_heating["devices"]["056ee145a816487eaa69243c3280f8bf"]["sensors"][ +m_adam_heating["056ee145a816487eaa69243c3280f8bf"]["sensors"][ "water_temperature" ] = 37.0 -m_adam_heating["devices"]["056ee145a816487eaa69243c3280f8bf"]["sensors"][ +m_adam_heating["056ee145a816487eaa69243c3280f8bf"]["sensors"][ "intended_boiler_temperature" ] = 38.1 -m_adam_heating["devices"]["056ee145a816487eaa69243c3280f8bf"]["max_dhw_temperature"] = { +m_adam_heating["056ee145a816487eaa69243c3280f8bf"]["max_dhw_temperature"] = { "setpoint": 60.0, "lower_bound": 40.0, "upper_bound": 60.0, @@ -245,66 +245,66 @@ def json_writer(manual_name: str, all_data: dict) -> None: ### Manual Anna fixtures base_anna_manual = "anna_heatpump_heating" -basefile = f"./fixtures/{base_anna_manual}/all_data.json" +basefile = f"./fixtures/{base_anna_manual}/data.json" io = open(basefile) base = json.load(io) m_anna_heatpump_cooling = base.copy() # Go for 1cbf -m_anna_heatpump_cooling["devices"]["1cbf783bb11e4a7c8a6843dee3a86927"][ +m_anna_heatpump_cooling["1cbf783bb11e4a7c8a6843dee3a86927"][ "model" ] = "Generic heater/cooler" -m_anna_heatpump_cooling["devices"]["1cbf783bb11e4a7c8a6843dee3a86927"][ +m_anna_heatpump_cooling["1cbf783bb11e4a7c8a6843dee3a86927"][ "binary_sensors" ]["cooling_enabled"] = True -m_anna_heatpump_cooling["devices"]["1cbf783bb11e4a7c8a6843dee3a86927"][ +m_anna_heatpump_cooling["1cbf783bb11e4a7c8a6843dee3a86927"][ "binary_sensors" ]["heating_state"] = False -m_anna_heatpump_cooling["devices"]["1cbf783bb11e4a7c8a6843dee3a86927"][ +m_anna_heatpump_cooling["1cbf783bb11e4a7c8a6843dee3a86927"][ "binary_sensors" ]["cooling_state"] = True -m_anna_heatpump_cooling["devices"]["1cbf783bb11e4a7c8a6843dee3a86927"]["sensors"][ +m_anna_heatpump_cooling["1cbf783bb11e4a7c8a6843dee3a86927"]["sensors"][ "water_temperature" ] = 22.7 -m_anna_heatpump_cooling["devices"]["1cbf783bb11e4a7c8a6843dee3a86927"]["sensors"][ +m_anna_heatpump_cooling["1cbf783bb11e4a7c8a6843dee3a86927"]["sensors"][ "dhw_temperature" ] = 41.5 -m_anna_heatpump_cooling["devices"]["1cbf783bb11e4a7c8a6843dee3a86927"]["sensors"][ +m_anna_heatpump_cooling["1cbf783bb11e4a7c8a6843dee3a86927"]["sensors"][ "intended_boiler_temperature" ] = 0.0 -m_anna_heatpump_cooling["devices"]["1cbf783bb11e4a7c8a6843dee3a86927"]["sensors"][ +m_anna_heatpump_cooling["1cbf783bb11e4a7c8a6843dee3a86927"]["sensors"][ "modulation_level" ] = 40 -m_anna_heatpump_cooling["devices"]["1cbf783bb11e4a7c8a6843dee3a86927"]["sensors"][ +m_anna_heatpump_cooling["1cbf783bb11e4a7c8a6843dee3a86927"]["sensors"][ "return_temperature" ] = 23.8 -m_anna_heatpump_cooling["devices"]["1cbf783bb11e4a7c8a6843dee3a86927"]["sensors"][ +m_anna_heatpump_cooling["1cbf783bb11e4a7c8a6843dee3a86927"]["sensors"][ "outdoor_air_temperature" ] = 28.0 # Go for 015a -m_anna_heatpump_cooling["devices"]["015ae9ea3f964e668e490fa39da3870b"]["sensors"][ +m_anna_heatpump_cooling["015ae9ea3f964e668e490fa39da3870b"]["sensors"][ "outdoor_temperature" ] = 28.2 # Go for 3cb7 -m_anna_heatpump_cooling["devices"]["3cb70739631c4d17a86b8b12e8a5161b"]["control_state"] = "cooling" -m_anna_heatpump_cooling["devices"]["3cb70739631c4d17a86b8b12e8a5161b"]["thermostat"][ +m_anna_heatpump_cooling["3cb70739631c4d17a86b8b12e8a5161b"]["control_state"] = "cooling" +m_anna_heatpump_cooling["3cb70739631c4d17a86b8b12e8a5161b"]["thermostat"][ "setpoint_low" ] = 20.5 -m_anna_heatpump_cooling["devices"]["3cb70739631c4d17a86b8b12e8a5161b"]["thermostat"][ +m_anna_heatpump_cooling["3cb70739631c4d17a86b8b12e8a5161b"]["thermostat"][ "setpoint_high" ] = 30.0 -m_anna_heatpump_cooling["devices"]["3cb70739631c4d17a86b8b12e8a5161b"]["sensors"][ +m_anna_heatpump_cooling["3cb70739631c4d17a86b8b12e8a5161b"]["sensors"][ "temperature" ] = 26.3 -m_anna_heatpump_cooling["devices"]["3cb70739631c4d17a86b8b12e8a5161b"]["sensors"][ +m_anna_heatpump_cooling["3cb70739631c4d17a86b8b12e8a5161b"]["sensors"][ "setpoint_low" ] = 20.5 -m_anna_heatpump_cooling["devices"]["3cb70739631c4d17a86b8b12e8a5161b"]["sensors"][ +m_anna_heatpump_cooling["3cb70739631c4d17a86b8b12e8a5161b"]["sensors"][ "setpoint_high" ] = 30.0 @@ -315,39 +315,39 @@ def json_writer(manual_name: str, all_data: dict) -> None: m_anna_heatpump_idle = m_anna_heatpump_cooling.copy() # Go for 1cbf -m_anna_heatpump_idle["devices"]["1cbf783bb11e4a7c8a6843dee3a86927"]["binary_sensors"][ +m_anna_heatpump_idle["1cbf783bb11e4a7c8a6843dee3a86927"]["binary_sensors"][ "compressor_state" ] = False -m_anna_heatpump_idle["devices"]["1cbf783bb11e4a7c8a6843dee3a86927"]["binary_sensors"][ +m_anna_heatpump_idle["1cbf783bb11e4a7c8a6843dee3a86927"]["binary_sensors"][ "cooling_state" ] = False -m_anna_heatpump_idle["devices"]["1cbf783bb11e4a7c8a6843dee3a86927"]["sensors"][ +m_anna_heatpump_idle["1cbf783bb11e4a7c8a6843dee3a86927"]["sensors"][ "water_temperature" ] = 19.1 -m_anna_heatpump_idle["devices"]["1cbf783bb11e4a7c8a6843dee3a86927"]["sensors"][ +m_anna_heatpump_idle["1cbf783bb11e4a7c8a6843dee3a86927"]["sensors"][ "dhw_temperature" ] = 46.3 -m_anna_heatpump_idle["devices"]["1cbf783bb11e4a7c8a6843dee3a86927"]["sensors"][ +m_anna_heatpump_idle["1cbf783bb11e4a7c8a6843dee3a86927"]["sensors"][ "intended_boiler_temperature" ] = 18.0 -m_anna_heatpump_idle["devices"]["1cbf783bb11e4a7c8a6843dee3a86927"]["sensors"][ +m_anna_heatpump_idle["1cbf783bb11e4a7c8a6843dee3a86927"]["sensors"][ "modulation_level" ] = 0 -m_anna_heatpump_idle["devices"]["1cbf783bb11e4a7c8a6843dee3a86927"]["sensors"][ +m_anna_heatpump_idle["1cbf783bb11e4a7c8a6843dee3a86927"]["sensors"][ "return_temperature" ] = 22.0 -m_anna_heatpump_idle["devices"]["1cbf783bb11e4a7c8a6843dee3a86927"]["sensors"][ +m_anna_heatpump_idle["1cbf783bb11e4a7c8a6843dee3a86927"]["sensors"][ "outdoor_air_temperature" ] = 28.2 # Go for 3cb7 -m_anna_heatpump_idle["devices"]["3cb70739631c4d17a86b8b12e8a5161b"]["control_state"] = "idle" -m_anna_heatpump_idle["devices"]["3cb70739631c4d17a86b8b12e8a5161b"]["sensors"][ +m_anna_heatpump_idle["3cb70739631c4d17a86b8b12e8a5161b"]["control_state"] = "idle" +m_anna_heatpump_idle["3cb70739631c4d17a86b8b12e8a5161b"]["sensors"][ "temperature" ] = 23.0 -m_anna_heatpump_idle["devices"]["3cb70739631c4d17a86b8b12e8a5161b"]["sensors"][ +m_anna_heatpump_idle["3cb70739631c4d17a86b8b12e8a5161b"]["sensors"][ "cooling_activation_outdoor_temperature" ] = 25.0 From e1b7796cb1013d4d2bb55dc8bfa62df9abb6f766 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 20 Jan 2025 20:13:34 +0100 Subject: [PATCH 36/66] Save updated manual fixtures --- fixtures/m_adam_cooling/data.json | 203 ++++++ fixtures/m_adam_heating/data.json | 202 ++++++ fixtures/m_adam_jip/data.json | 370 +++++++++++ .../data.json | 584 ++++++++++++++++++ fixtures/m_anna_heatpump_cooling/data.json | 97 +++ fixtures/m_anna_heatpump_idle/data.json | 97 +++ 6 files changed, 1553 insertions(+) create mode 100644 fixtures/m_adam_cooling/data.json create mode 100644 fixtures/m_adam_heating/data.json create mode 100644 fixtures/m_adam_jip/data.json create mode 100644 fixtures/m_adam_multiple_devices_per_zone/data.json create mode 100644 fixtures/m_anna_heatpump_cooling/data.json create mode 100644 fixtures/m_anna_heatpump_idle/data.json diff --git a/fixtures/m_adam_cooling/data.json b/fixtures/m_adam_cooling/data.json new file mode 100644 index 000000000..51f19ca3c --- /dev/null +++ b/fixtures/m_adam_cooling/data.json @@ -0,0 +1,203 @@ +{ + "056ee145a816487eaa69243c3280f8bf": { + "available": true, + "binary_sensors": { + "cooling_state": true, + "dhw_state": false, + "flame_state": false, + "heating_state": false + }, + "dev_class": "heater_central", + "location": "bc93488efab249e5bc54fd7e175a6f91", + "maximum_boiler_temperature": { + "lower_bound": 25.0, + "resolution": 0.01, + "setpoint": 50.0, + "upper_bound": 95.0 + }, + "model": "Generic heater", + "name": "OpenTherm", + "sensors": { + "intended_boiler_temperature": 17.5, + "water_temperature": 19.0 + }, + "switches": { + "dhw_cm_switch": false + } + }, + "1772a4ea304041adb83f357b751341ff": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2020-11-04T01:00:00+01:00", + "hardware": "1", + "location": "f871b8c4d63549319221e294e4f88074", + "model": "Tom/Floor", + "model_id": "106-03", + "name": "Tom Badkamer", + "sensors": { + "battery": 99, + "setpoint": 18.0, + "temperature": 21.6, + "temperature_difference": -0.2, + "valve_position": 100 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.1, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "000D6F000C8FF5EE" + }, + "ad4838d7d35c4d6ea796ee12ae5aedf8": { + "available": true, + "dev_class": "thermostat", + "location": "f2bf9048bef64cc5b6d5110154e33c81", + "model": "ThermoTouch", + "model_id": "143.1", + "name": "Anna", + "sensors": { + "setpoint": 23.5, + "temperature": 25.8 + }, + "vendor": "Plugwise" + }, + "da224107914542988a88561b4452b0f6": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "3.7.8", + "gateway_modes": ["away", "full", "vacation"], + "hardware": "AME Smile 2.0 board", + "location": "bc93488efab249e5bc54fd7e175a6f91", + "mac_address": "012345679891", + "model": "Gateway", + "model_id": "smile_open_therm", + "name": "Adam", + "notifications": {}, + "regulation_modes": [ + "bleeding_hot", + "bleeding_cold", + "off", + "heating", + "cooling" + ], + "select_gateway_mode": "full", + "select_regulation_mode": "cooling", + "sensors": { + "outdoor_temperature": 29.65 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "000D6F000D5A168D" + }, + "e2f4322d57924fa090fbbc48b3a140dc": { + "available": true, + "binary_sensors": { + "low_battery": true + }, + "dev_class": "zone_thermostat", + "firmware": "2016-10-10T02:00:00+02:00", + "hardware": "255", + "location": "f871b8c4d63549319221e294e4f88074", + "model": "Lisa", + "model_id": "158-01", + "name": "Lisa Badkamer", + "sensors": { + "battery": 14, + "setpoint": 23.5, + "temperature": 23.9 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "000D6F000C869B61" + }, + "e8ef2a01ed3b4139a53bf749204fe6b4": { + "dev_class": "switching", + "members": [ + "2568cc4b9c1e401495d4741a5f89bee1", + "29542b2b6a6a4169acecc15c72a599b8" + ], + "model": "Switchgroup", + "name": "Test", + "switches": { + "relay": true + }, + "vendor": "Plugwise" + }, + "f2bf9048bef64cc5b6d5110154e33c81": { + "active_preset": "home", + "available_schedules": [ + "Badkamer", + "Test", + "Vakantie", + "Weekschema", + "off" + ], + "climate_mode": "cool", + "control_state": "cooling", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Living room", + "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], + "select_schedule": "off", + "sensors": { + "electricity_consumed": 149.9, + "electricity_produced": 0.0, + "temperature": 25.8 + }, + "thermostat": { + "lower_bound": 1.0, + "resolution": 0.01, + "setpoint": 23.5, + "upper_bound": 35.0 + }, + "thermostats": { + "primary": ["ad4838d7d35c4d6ea796ee12ae5aedf8"], + "secondary": [] + }, + "vendor": "Plugwise" + }, + "f871b8c4d63549319221e294e4f88074": { + "active_preset": "home", + "available_schedules": [ + "Badkamer", + "Test", + "Vakantie", + "Weekschema", + "off" + ], + "climate_mode": "auto", + "control_state": "cooling", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Bathroom", + "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], + "select_schedule": "Badkamer", + "sensors": { + "electricity_consumed": 0.0, + "electricity_produced": 0.0, + "temperature": 23.9 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 25.0, + "upper_bound": 99.9 + }, + "thermostats": { + "primary": ["e2f4322d57924fa090fbbc48b3a140dc"], + "secondary": ["1772a4ea304041adb83f357b751341ff"] + }, + "vendor": "Plugwise" + } +} diff --git a/fixtures/m_adam_heating/data.json b/fixtures/m_adam_heating/data.json new file mode 100644 index 000000000..b10ff8ec2 --- /dev/null +++ b/fixtures/m_adam_heating/data.json @@ -0,0 +1,202 @@ +{ + "056ee145a816487eaa69243c3280f8bf": { + "available": true, + "binary_sensors": { + "dhw_state": false, + "flame_state": false, + "heating_state": true + }, + "dev_class": "heater_central", + "location": "bc93488efab249e5bc54fd7e175a6f91", + "max_dhw_temperature": { + "lower_bound": 40.0, + "resolution": 0.01, + "setpoint": 60.0, + "upper_bound": 60.0 + }, + "maximum_boiler_temperature": { + "lower_bound": 25.0, + "resolution": 0.01, + "setpoint": 50.0, + "upper_bound": 95.0 + }, + "model": "Generic heater", + "name": "OpenTherm", + "sensors": { + "intended_boiler_temperature": 38.1, + "water_temperature": 37.0 + }, + "switches": { + "dhw_cm_switch": false + } + }, + "1772a4ea304041adb83f357b751341ff": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2020-11-04T01:00:00+01:00", + "hardware": "1", + "location": "f871b8c4d63549319221e294e4f88074", + "model": "Tom/Floor", + "model_id": "106-03", + "name": "Tom Badkamer", + "sensors": { + "battery": 99, + "setpoint": 18.0, + "temperature": 18.6, + "temperature_difference": -0.2, + "valve_position": 100 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.1, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "000D6F000C8FF5EE" + }, + "ad4838d7d35c4d6ea796ee12ae5aedf8": { + "available": true, + "dev_class": "thermostat", + "location": "f2bf9048bef64cc5b6d5110154e33c81", + "model": "ThermoTouch", + "model_id": "143.1", + "name": "Anna", + "sensors": { + "setpoint": 20.0, + "temperature": 19.1 + }, + "vendor": "Plugwise" + }, + "da224107914542988a88561b4452b0f6": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "3.7.8", + "gateway_modes": ["away", "full", "vacation"], + "hardware": "AME Smile 2.0 board", + "location": "bc93488efab249e5bc54fd7e175a6f91", + "mac_address": "012345679891", + "model": "Gateway", + "model_id": "smile_open_therm", + "name": "Adam", + "notifications": {}, + "regulation_modes": ["bleeding_hot", "bleeding_cold", "off", "heating"], + "select_gateway_mode": "full", + "select_regulation_mode": "heating", + "sensors": { + "outdoor_temperature": -1.25 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "000D6F000D5A168D" + }, + "e2f4322d57924fa090fbbc48b3a140dc": { + "available": true, + "binary_sensors": { + "low_battery": true + }, + "dev_class": "zone_thermostat", + "firmware": "2016-10-10T02:00:00+02:00", + "hardware": "255", + "location": "f871b8c4d63549319221e294e4f88074", + "model": "Lisa", + "model_id": "158-01", + "name": "Lisa Badkamer", + "sensors": { + "battery": 14, + "setpoint": 15.0, + "temperature": 17.9 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "000D6F000C869B61" + }, + "e8ef2a01ed3b4139a53bf749204fe6b4": { + "dev_class": "switching", + "members": [ + "2568cc4b9c1e401495d4741a5f89bee1", + "29542b2b6a6a4169acecc15c72a599b8" + ], + "model": "Switchgroup", + "name": "Test", + "switches": { + "relay": true + }, + "vendor": "Plugwise" + }, + "f2bf9048bef64cc5b6d5110154e33c81": { + "active_preset": "home", + "available_schedules": [ + "Badkamer", + "Test", + "Vakantie", + "Weekschema", + "off" + ], + "climate_mode": "heat", + "control_state": "preheating", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Living room", + "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], + "select_schedule": "off", + "sensors": { + "electricity_consumed": 149.9, + "electricity_produced": 0.0, + "temperature": 19.1 + }, + "thermostat": { + "lower_bound": 1.0, + "resolution": 0.01, + "setpoint": 20.0, + "upper_bound": 35.0 + }, + "thermostats": { + "primary": ["ad4838d7d35c4d6ea796ee12ae5aedf8"], + "secondary": [] + }, + "vendor": "Plugwise" + }, + "f871b8c4d63549319221e294e4f88074": { + "active_preset": "home", + "available_schedules": [ + "Badkamer", + "Test", + "Vakantie", + "Weekschema", + "off" + ], + "climate_mode": "auto", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Bathroom", + "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], + "select_schedule": "Badkamer", + "sensors": { + "electricity_consumed": 0.0, + "electricity_produced": 0.0, + "temperature": 17.9 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 15.0, + "upper_bound": 99.9 + }, + "thermostats": { + "primary": ["e2f4322d57924fa090fbbc48b3a140dc"], + "secondary": ["1772a4ea304041adb83f357b751341ff"] + }, + "vendor": "Plugwise" + } +} diff --git a/fixtures/m_adam_jip/data.json b/fixtures/m_adam_jip/data.json new file mode 100644 index 000000000..8de57910f --- /dev/null +++ b/fixtures/m_adam_jip/data.json @@ -0,0 +1,370 @@ +{ + "06aecb3d00354375924f50c47af36bd2": { + "active_preset": "no_frost", + "climate_mode": "off", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Slaapkamer", + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "sensors": { + "temperature": 24.2 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 13.0, + "upper_bound": 99.9 + }, + "thermostats": { + "primary": ["1346fbd8498d4dbcab7e18d51b771f3d"], + "secondary": ["356b65335e274d769c338223e7af9c33"] + }, + "vendor": "Plugwise" + }, + "13228dab8ce04617af318a2888b3c548": { + "active_preset": "home", + "climate_mode": "heat", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Woonkamer", + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "sensors": { + "temperature": 27.4 + }, + "thermostat": { + "lower_bound": 4.0, + "resolution": 0.01, + "setpoint": 9.0, + "upper_bound": 30.0 + }, + "thermostats": { + "primary": ["f61f1a2535f54f52ad006a3d18e459ca"], + "secondary": ["833de10f269c4deab58fb9df69901b4e"] + }, + "vendor": "Plugwise" + }, + "1346fbd8498d4dbcab7e18d51b771f3d": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "zone_thermostat", + "firmware": "2016-10-27T02:00:00+02:00", + "hardware": "255", + "location": "06aecb3d00354375924f50c47af36bd2", + "model": "Lisa", + "model_id": "158-01", + "name": "Slaapkamer", + "sensors": { + "battery": 92, + "setpoint": 13.0, + "temperature": 24.2 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A03" + }, + "1da4d325838e4ad8aac12177214505c9": { + "available": true, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2020-11-04T01:00:00+01:00", + "hardware": "1", + "location": "d58fec52899f4f1c92e4f8fad6d8c48c", + "model": "Tom/Floor", + "model_id": "106-03", + "name": "Tom Logeerkamer", + "sensors": { + "setpoint": 13.0, + "temperature": 28.8, + "temperature_difference": 2.0, + "valve_position": 0.0 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.1, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A07" + }, + "356b65335e274d769c338223e7af9c33": { + "available": true, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2020-11-04T01:00:00+01:00", + "hardware": "1", + "location": "06aecb3d00354375924f50c47af36bd2", + "model": "Tom/Floor", + "model_id": "106-03", + "name": "Tom Slaapkamer", + "sensors": { + "setpoint": 13.0, + "temperature": 24.2, + "temperature_difference": 1.7, + "valve_position": 0.0 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.1, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A05" + }, + "457ce8414de24596a2d5e7dbc9c7682f": { + "available": true, + "dev_class": "zz_misc_plug", + "location": "9e4433a9d69f40b3aefd15e74395eaec", + "model": "Aqara Smart Plug", + "model_id": "lumi.plug.maeu01", + "name": "Plug", + "sensors": { + "electricity_consumed_interval": 0.0 + }, + "switches": { + "lock": true, + "relay": false + }, + "vendor": "LUMI", + "zigbee_mac_address": "ABCD012345670A06" + }, + "6f3e9d7084214c21b9dfa46f6eeb8700": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "zone_thermostat", + "firmware": "2016-10-27T02:00:00+02:00", + "hardware": "255", + "location": "d27aede973b54be484f6842d1b2802ad", + "model": "Lisa", + "model_id": "158-01", + "name": "Kinderkamer", + "sensors": { + "battery": 79, + "setpoint": 13.0, + "temperature": 30.0 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A02" + }, + "833de10f269c4deab58fb9df69901b4e": { + "available": true, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2020-11-04T01:00:00+01:00", + "hardware": "1", + "location": "13228dab8ce04617af318a2888b3c548", + "model": "Tom/Floor", + "model_id": "106-03", + "name": "Tom Woonkamer", + "sensors": { + "setpoint": 9.0, + "temperature": 24.0, + "temperature_difference": 1.8, + "valve_position": 100 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.1, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A09" + }, + "a6abc6a129ee499c88a4d420cc413b47": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "zone_thermostat", + "firmware": "2016-10-27T02:00:00+02:00", + "hardware": "255", + "location": "d58fec52899f4f1c92e4f8fad6d8c48c", + "model": "Lisa", + "model_id": "158-01", + "name": "Logeerkamer", + "sensors": { + "battery": 80, + "setpoint": 13.0, + "temperature": 30.0 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A01" + }, + "b5c2386c6f6342669e50fe49dd05b188": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "3.2.8", + "gateway_modes": ["away", "full", "vacation"], + "hardware": "AME Smile 2.0 board", + "location": "9e4433a9d69f40b3aefd15e74395eaec", + "mac_address": "012345670001", + "model": "Gateway", + "model_id": "smile_open_therm", + "name": "Adam", + "notifications": {}, + "regulation_modes": ["heating", "off", "bleeding_cold", "bleeding_hot"], + "select_gateway_mode": "full", + "select_regulation_mode": "heating", + "sensors": { + "outdoor_temperature": 24.9 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670101" + }, + "d27aede973b54be484f6842d1b2802ad": { + "active_preset": "home", + "climate_mode": "heat", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Kinderkamer", + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "sensors": { + "temperature": 30.0 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 13.0, + "upper_bound": 99.9 + }, + "thermostats": { + "primary": ["6f3e9d7084214c21b9dfa46f6eeb8700"], + "secondary": ["d4496250d0e942cfa7aea3476e9070d5"] + }, + "vendor": "Plugwise" + }, + "d4496250d0e942cfa7aea3476e9070d5": { + "available": true, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2020-11-04T01:00:00+01:00", + "hardware": "1", + "location": "d27aede973b54be484f6842d1b2802ad", + "model": "Tom/Floor", + "model_id": "106-03", + "name": "Tom Kinderkamer", + "sensors": { + "setpoint": 13.0, + "temperature": 28.7, + "temperature_difference": 1.9, + "valve_position": 0.0 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.1, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A04" + }, + "d58fec52899f4f1c92e4f8fad6d8c48c": { + "active_preset": "home", + "climate_mode": "heat", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Logeerkamer", + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "sensors": { + "temperature": 30.0 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 13.0, + "upper_bound": 99.9 + }, + "thermostats": { + "primary": ["a6abc6a129ee499c88a4d420cc413b47"], + "secondary": ["1da4d325838e4ad8aac12177214505c9"] + }, + "vendor": "Plugwise" + }, + "e4684553153b44afbef2200885f379dc": { + "available": true, + "binary_sensors": { + "dhw_state": false, + "flame_state": false, + "heating_state": false + }, + "dev_class": "heater_central", + "location": "9e4433a9d69f40b3aefd15e74395eaec", + "max_dhw_temperature": { + "lower_bound": 40.0, + "resolution": 0.01, + "setpoint": 60.0, + "upper_bound": 60.0 + }, + "maximum_boiler_temperature": { + "lower_bound": 20.0, + "resolution": 0.01, + "setpoint": 90.0, + "upper_bound": 90.0 + }, + "model": "Generic heater", + "model_id": "10.20", + "name": "OpenTherm", + "sensors": { + "intended_boiler_temperature": 0.0, + "modulation_level": 0.0, + "return_temperature": 37.1, + "water_pressure": 1.4, + "water_temperature": 37.3 + }, + "switches": { + "dhw_cm_switch": false + }, + "vendor": "Remeha B.V." + }, + "f61f1a2535f54f52ad006a3d18e459ca": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "zone_thermometer", + "firmware": "2020-09-01T02:00:00+02:00", + "hardware": "1", + "location": "13228dab8ce04617af318a2888b3c548", + "model": "Jip", + "model_id": "168-01", + "name": "Woonkamer", + "sensors": { + "battery": 100, + "humidity": 56.2, + "setpoint": 9.0, + "temperature": 27.4 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A08" + } +} diff --git a/fixtures/m_adam_multiple_devices_per_zone/data.json b/fixtures/m_adam_multiple_devices_per_zone/data.json new file mode 100644 index 000000000..7c38b1b21 --- /dev/null +++ b/fixtures/m_adam_multiple_devices_per_zone/data.json @@ -0,0 +1,584 @@ +{ + "02cf28bfec924855854c544690a609ef": { + "available": true, + "dev_class": "vcr_plug", + "firmware": "2019-06-21T02:00:00+02:00", + "location": "cd143c07248f491493cea0533bc3d669", + "model": "Plug", + "model_id": "160-01", + "name": "NVR", + "sensors": { + "electricity_consumed": 34.0, + "electricity_consumed_interval": 9.15, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": true, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A15" + }, + "08963fec7c53423ca5680aa4cb502c63": { + "active_preset": "away", + "available_schedules": [ + "CV Roan", + "Bios Schema met Film Avond", + "GF7 Woonkamer", + "Badkamer Schema", + "CV Jessie", + "off" + ], + "climate_mode": "auto", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Badkamer", + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "select_schedule": "Badkamer Schema", + "sensors": { + "temperature": 18.9 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 14.0, + "upper_bound": 100.0 + }, + "thermostats": { + "primary": [ + "f1fee6043d3642a9b0a65297455f008e", + "680423ff840043738f42cc7f1ff97a36" + ], + "secondary": [] + }, + "vendor": "Plugwise" + }, + "12493538af164a409c6a1c79e38afe1c": { + "active_preset": "away", + "available_schedules": [ + "CV Roan", + "Bios Schema met Film Avond", + "GF7 Woonkamer", + "Badkamer Schema", + "CV Jessie", + "off" + ], + "climate_mode": "heat", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Bios", + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "select_schedule": "off", + "sensors": { + "electricity_consumed": 0.0, + "electricity_produced": 0.0, + "temperature": 16.5 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 13.0, + "upper_bound": 100.0 + }, + "thermostats": { + "primary": ["df4a4a8169904cdb9c03d61a21f42140"], + "secondary": ["a2c3583e0a6349358998b760cea82d2a"] + }, + "vendor": "Plugwise" + }, + "21f2b542c49845e6bb416884c55778d6": { + "available": true, + "dev_class": "game_console_plug", + "firmware": "2019-06-21T02:00:00+02:00", + "location": "cd143c07248f491493cea0533bc3d669", + "model": "Plug", + "model_id": "160-01", + "name": "Playstation Smart Plug", + "sensors": { + "electricity_consumed": 84.1, + "electricity_consumed_interval": 8.6, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": false, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A12" + }, + "446ac08dd04d4eff8ac57489757b7314": { + "active_preset": "no_frost", + "climate_mode": "heat", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Garage", + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "sensors": { + "temperature": 15.6 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 5.5, + "upper_bound": 100.0 + }, + "thermostats": { + "primary": ["e7693eb9582644e5b865dba8d4447cf1"], + "secondary": [] + }, + "vendor": "Plugwise" + }, + "4a810418d5394b3f82727340b91ba740": { + "available": true, + "dev_class": "router_plug", + "firmware": "2019-06-21T02:00:00+02:00", + "location": "cd143c07248f491493cea0533bc3d669", + "model": "Plug", + "model_id": "160-01", + "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_plug", + "firmware": "2019-06-21T02:00:00+02:00", + "location": "cd143c07248f491493cea0533bc3d669", + "model": "Plug", + "model_id": "160-01", + "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, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2019-03-27T01:00:00+01:00", + "hardware": "1", + "location": "08963fec7c53423ca5680aa4cb502c63", + "model": "Tom/Floor", + "model_id": "106-03", + "name": "Thermostatic Radiator Badkamer 1", + "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": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "zone_thermostat", + "firmware": "2016-10-27T02:00:00+02:00", + "hardware": "255", + "location": "82fa13f017d240daa0d0ea1775420f24", + "model": "Lisa", + "model_id": "158-01", + "name": "Zone Thermostat 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 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A03" + }, + "78d1126fc4c743db81b61c20e88342a7": { + "available": true, + "dev_class": "central_heating_pump_plug", + "firmware": "2019-06-21T02:00:00+02:00", + "location": "c50f167537524366a5af7aa3942feb1e", + "model": "Plug", + "model_id": "160-01", + "name": "CV Pomp", + "sensors": { + "electricity_consumed": 35.6, + "electricity_consumed_interval": 7.37, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A05" + }, + "82fa13f017d240daa0d0ea1775420f24": { + "active_preset": "asleep", + "available_schedules": [ + "CV Roan", + "Bios Schema met Film Avond", + "GF7 Woonkamer", + "Badkamer Schema", + "CV Jessie", + "off" + ], + "climate_mode": "auto", + "control_state": "idle", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Jessie", + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "select_schedule": "CV Jessie", + "sensors": { + "temperature": 17.2 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 15.0, + "upper_bound": 100.0 + }, + "thermostats": { + "primary": ["6a3bf693d05e48e0b460c815a4fdd09d"], + "secondary": ["d3da73bde12a47d5a6b8f9dad971f2ec"] + }, + "vendor": "Plugwise" + }, + "90986d591dcd426cae3ec3e8111ff730": { + "binary_sensors": { + "heating_state": true + }, + "dev_class": "heater_central", + "location": "1f9dcf83fd4e4b66b72ff787957bfe5d", + "model": "Unknown", + "name": "OnOff", + "sensors": { + "intended_boiler_temperature": 70.0, + "modulation_level": 1, + "water_temperature": 70.0 + } + }, + "a28f588dc4a049a483fd03a30361ad3a": { + "available": true, + "dev_class": "settop_plug", + "firmware": "2019-06-21T02:00:00+02:00", + "location": "cd143c07248f491493cea0533bc3d669", + "model": "Plug", + "model_id": "160-01", + "name": "Fibaro HC2", + "sensors": { + "electricity_consumed": 12.5, + "electricity_consumed_interval": 3.8, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": true, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A13" + }, + "a2c3583e0a6349358998b760cea82d2a": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2019-03-27T01:00:00+01:00", + "hardware": "1", + "location": "12493538af164a409c6a1c79e38afe1c", + "model": "Tom/Floor", + "model_id": "106-03", + "name": "Bios Cv Thermostatic Radiator ", + "sensors": { + "battery": 62, + "setpoint": 13.0, + "temperature": 17.2, + "temperature_difference": -0.2, + "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": "ABCD012345670A09" + }, + "b310b72a0e354bfab43089919b9a88bf": { + "available": true, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2019-03-27T01:00:00+01:00", + "hardware": "1", + "location": "c50f167537524366a5af7aa3942feb1e", + "model": "Tom/Floor", + "model_id": "106-03", + "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": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "zone_thermostat", + "firmware": "2016-08-02T02:00:00+02:00", + "hardware": "255", + "location": "c50f167537524366a5af7aa3942feb1e", + "model": "Lisa", + "model_id": "158-01", + "name": "Zone Lisa WK", + "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 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A07" + }, + "c50f167537524366a5af7aa3942feb1e": { + "active_preset": "home", + "available_schedules": [ + "CV Roan", + "Bios Schema met Film Avond", + "GF7 Woonkamer", + "Badkamer Schema", + "CV Jessie", + "off" + ], + "climate_mode": "auto", + "control_state": "heating", + "dev_class": "climate", + "model": "ThermoZone", + "name": "Woonkamer", + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "select_schedule": "GF7 Woonkamer", + "sensors": { + "electricity_consumed": 35.6, + "electricity_produced": 0.0, + "temperature": 20.9 + }, + "thermostat": { + "lower_bound": 0.0, + "resolution": 0.01, + "setpoint": 21.5, + "upper_bound": 100.0 + }, + "thermostats": { + "primary": ["b59bcebaf94b499ea7d46e4a66fb62d8"], + "secondary": ["b310b72a0e354bfab43089919b9a88bf"] + }, + "vendor": "Plugwise" + }, + "cd0ddb54ef694e11ac18ed1cbce5dbbd": { + "available": true, + "dev_class": "vcr_plug", + "firmware": "2019-06-21T02:00:00+02:00", + "location": "cd143c07248f491493cea0533bc3d669", + "model": "Plug", + "model_id": "160-01", + "name": "NAS", + "sensors": { + "electricity_consumed": 16.5, + "electricity_consumed_interval": 0.5, + "electricity_produced": 0.0, + "electricity_produced_interval": 0.0 + }, + "switches": { + "lock": true, + "relay": true + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A14" + }, + "d3da73bde12a47d5a6b8f9dad971f2ec": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2019-03-27T01:00:00+01:00", + "hardware": "1", + "location": "82fa13f017d240daa0d0ea1775420f24", + "model": "Tom/Floor", + "model_id": "106-03", + "name": "Thermostatic Radiator Jessie", + "sensors": { + "battery": 62, + "setpoint": 15.0, + "temperature": 17.1, + "temperature_difference": 0.1, + "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": "ABCD012345670A10" + }, + "df4a4a8169904cdb9c03d61a21f42140": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "zone_thermostat", + "firmware": "2016-10-27T02:00:00+02:00", + "hardware": "255", + "location": "12493538af164a409c6a1c79e38afe1c", + "model": "Lisa", + "model_id": "158-01", + "name": "Zone Lisa Bios", + "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 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670A06" + }, + "e7693eb9582644e5b865dba8d4447cf1": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2019-03-27T01:00:00+01:00", + "hardware": "1", + "location": "446ac08dd04d4eff8ac57489757b7314", + "model": "Tom/Floor", + "model_id": "106-03", + "name": "CV Kraan Garage", + "sensors": { + "battery": 68, + "setpoint": 5.5, + "temperature": 15.6, + "temperature_difference": 0.0, + "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": "ABCD012345670A11" + }, + "f1fee6043d3642a9b0a65297455f008e": { + "available": true, + "binary_sensors": { + "low_battery": false + }, + "dev_class": "thermostatic_radiator_valve", + "firmware": "2016-10-27T02:00:00+02:00", + "hardware": "255", + "location": "08963fec7c53423ca5680aa4cb502c63", + "model": "Lisa", + "model_id": "158-01", + "name": "Thermostatic Radiator Badkamer 2", + "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 + }, + "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", + "model_id": "smile_open_therm", + "name": "Adam", + "notifications": { + "af82e4ccf9c548528166d38e560662a4": { + "warning": "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device." + } + }, + "select_regulation_mode": "heating", + "sensors": { + "outdoor_temperature": 7.81 + }, + "vendor": "Plugwise", + "zigbee_mac_address": "ABCD012345670101" + } +} diff --git a/fixtures/m_anna_heatpump_cooling/data.json b/fixtures/m_anna_heatpump_cooling/data.json new file mode 100644 index 000000000..ccfd816ff --- /dev/null +++ b/fixtures/m_anna_heatpump_cooling/data.json @@ -0,0 +1,97 @@ +{ + "015ae9ea3f964e668e490fa39da3870b": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "4.0.15", + "hardware": "AME Smile 2.0 board", + "location": "a57efe5f145f498c9be62a9b63626fbf", + "mac_address": "012345670001", + "model": "Gateway", + "model_id": "smile_thermo", + "name": "Smile Anna", + "notifications": {}, + "sensors": { + "outdoor_temperature": 28.2 + }, + "vendor": "Plugwise" + }, + "1cbf783bb11e4a7c8a6843dee3a86927": { + "available": true, + "binary_sensors": { + "compressor_state": true, + "cooling_enabled": true, + "cooling_state": true, + "dhw_state": false, + "flame_state": false, + "heating_state": false, + "secondary_boiler_state": false + }, + "dev_class": "heater_central", + "location": "a57efe5f145f498c9be62a9b63626fbf", + "max_dhw_temperature": { + "lower_bound": 35.0, + "resolution": 0.01, + "setpoint": 53.0, + "upper_bound": 60.0 + }, + "maximum_boiler_temperature": { + "lower_bound": 0.0, + "resolution": 1.0, + "setpoint": 60.0, + "upper_bound": 100.0 + }, + "model": "Generic heater/cooler", + "name": "OpenTherm", + "sensors": { + "dhw_temperature": 41.5, + "intended_boiler_temperature": 0.0, + "modulation_level": 40, + "outdoor_air_temperature": 28.0, + "return_temperature": 23.8, + "water_pressure": 1.57, + "water_temperature": 22.7 + }, + "switches": { + "dhw_cm_switch": false + }, + "vendor": "Techneco" + }, + "3cb70739631c4d17a86b8b12e8a5161b": { + "active_preset": "home", + "available_schedules": ["standaard", "off"], + "climate_mode": "auto", + "control_state": "cooling", + "dev_class": "thermostat", + "firmware": "2018-02-08T11:15:53+01:00", + "hardware": "6539-1301-5002", + "location": "c784ee9fdab44e1395b8dee7d7a497d5", + "model": "ThermoTouch", + "name": "Anna", + "preset_modes": ["no_frost", "home", "away", "asleep", "vacation"], + "select_schedule": "standaard", + "sensors": { + "cooling_activation_outdoor_temperature": 21.0, + "cooling_deactivation_threshold": 4.0, + "illuminance": 86.0, + "setpoint_high": 30.0, + "setpoint_low": 20.5, + "temperature": 26.3 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": -0.5, + "upper_bound": 2.0 + }, + "thermostat": { + "lower_bound": 4.0, + "resolution": 0.1, + "setpoint_high": 30.0, + "setpoint_low": 20.5, + "upper_bound": 30.0 + }, + "vendor": "Plugwise" + } +} diff --git a/fixtures/m_anna_heatpump_idle/data.json b/fixtures/m_anna_heatpump_idle/data.json new file mode 100644 index 000000000..5a1cdebd3 --- /dev/null +++ b/fixtures/m_anna_heatpump_idle/data.json @@ -0,0 +1,97 @@ +{ + "015ae9ea3f964e668e490fa39da3870b": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "4.0.15", + "hardware": "AME Smile 2.0 board", + "location": "a57efe5f145f498c9be62a9b63626fbf", + "mac_address": "012345670001", + "model": "Gateway", + "model_id": "smile_thermo", + "name": "Smile Anna", + "notifications": {}, + "sensors": { + "outdoor_temperature": 28.2 + }, + "vendor": "Plugwise" + }, + "1cbf783bb11e4a7c8a6843dee3a86927": { + "available": true, + "binary_sensors": { + "compressor_state": false, + "cooling_enabled": true, + "cooling_state": false, + "dhw_state": false, + "flame_state": false, + "heating_state": false, + "secondary_boiler_state": false + }, + "dev_class": "heater_central", + "location": "a57efe5f145f498c9be62a9b63626fbf", + "max_dhw_temperature": { + "lower_bound": 35.0, + "resolution": 0.01, + "setpoint": 53.0, + "upper_bound": 60.0 + }, + "maximum_boiler_temperature": { + "lower_bound": 0.0, + "resolution": 1.0, + "setpoint": 60.0, + "upper_bound": 100.0 + }, + "model": "Generic heater/cooler", + "name": "OpenTherm", + "sensors": { + "dhw_temperature": 46.3, + "intended_boiler_temperature": 18.0, + "modulation_level": 0, + "outdoor_air_temperature": 28.2, + "return_temperature": 22.0, + "water_pressure": 1.57, + "water_temperature": 19.1 + }, + "switches": { + "dhw_cm_switch": false + }, + "vendor": "Techneco" + }, + "3cb70739631c4d17a86b8b12e8a5161b": { + "active_preset": "home", + "available_schedules": ["standaard", "off"], + "climate_mode": "auto", + "control_state": "idle", + "dev_class": "thermostat", + "firmware": "2018-02-08T11:15:53+01:00", + "hardware": "6539-1301-5002", + "location": "c784ee9fdab44e1395b8dee7d7a497d5", + "model": "ThermoTouch", + "name": "Anna", + "preset_modes": ["no_frost", "home", "away", "asleep", "vacation"], + "select_schedule": "standaard", + "sensors": { + "cooling_activation_outdoor_temperature": 25.0, + "cooling_deactivation_threshold": 4.0, + "illuminance": 86.0, + "setpoint_high": 30.0, + "setpoint_low": 20.5, + "temperature": 23.0 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": -0.5, + "upper_bound": 2.0 + }, + "thermostat": { + "lower_bound": 4.0, + "resolution": 0.1, + "setpoint_high": 30.0, + "setpoint_low": 20.5, + "upper_bound": 30.0 + }, + "vendor": "Plugwise" + } +} From c3db4785eed1ebb2e876a1c9cae682ea1e4c26e3 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Mon, 20 Jan 2025 20:19:27 +0100 Subject: [PATCH 37/66] Remove old fixtures --- fixtures/adam_heatpump_cooling/all_data.json | 809 ------------------ fixtures/adam_jip/all_data.json | 373 -------- .../all_data.json | 595 ------------- .../all_data.json | 114 --- fixtures/adam_plus_anna/all_data.json | 132 --- fixtures/adam_plus_anna_new/all_data.json | 288 ------- .../all_data.json | 288 ------- fixtures/adam_zone_per_device/all_data.json | 592 ------------- fixtures/anna_elga_2/all_data.json | 87 -- fixtures/anna_elga_2_cooling/all_data.json | 93 -- .../anna_elga_2_schedule_off/all_data.json | 93 -- fixtures/anna_elga_no_cooling/all_data.json | 95 -- fixtures/anna_heatpump_cooling/all_data.json | 94 -- .../all_data.json | 94 -- fixtures/anna_heatpump_heating/all_data.json | 99 --- .../anna_loria_cooling_active/all_data.json | 98 --- fixtures/anna_loria_driessens/all_data.json | 104 --- .../anna_loria_heating_idle/all_data.json | 98 --- fixtures/anna_v4/all_data.json | 90 -- fixtures/anna_v4_dhw/all_data.json | 90 -- fixtures/anna_v4_no_tag/all_data.json | 90 -- .../anna_without_boiler_fw441/all_data.json | 63 -- fixtures/legacy_anna/all_data.json | 62 -- fixtures/legacy_anna_2/all_data.json | 66 -- fixtures/m_adam_cooling/all_data.json | 205 ----- fixtures/m_adam_heating/all_data.json | 204 ----- fixtures/m_adam_jip/all_data.json | 372 -------- .../all_data.json | 586 ------------- .../m_anna_heatpump_cooling/all_data.json | 99 --- fixtures/m_anna_heatpump_idle/all_data.json | 99 --- fixtures/p1v4_442_single/all_data.json | 45 - fixtures/p1v4_442_triple/all_data.json | 58 -- fixtures/smile_p1_v2/all_data.json | 36 - fixtures/smile_p1_v2_2/all_data.json | 36 - fixtures/stretch_v23/all_data.json | 356 -------- fixtures/stretch_v27_no_domain/all_data.json | 274 ------ fixtures/stretch_v31/all_data.json | 138 --- 37 files changed, 7115 deletions(-) delete mode 100644 fixtures/adam_heatpump_cooling/all_data.json delete mode 100644 fixtures/adam_jip/all_data.json delete mode 100644 fixtures/adam_multiple_devices_per_zone/all_data.json delete mode 100644 fixtures/adam_onoff_cooling_fake_firmware/all_data.json delete mode 100644 fixtures/adam_plus_anna/all_data.json delete mode 100644 fixtures/adam_plus_anna_new/all_data.json delete mode 100644 fixtures/adam_plus_anna_new_regulation_off/all_data.json delete mode 100644 fixtures/adam_zone_per_device/all_data.json delete mode 100644 fixtures/anna_elga_2/all_data.json delete mode 100644 fixtures/anna_elga_2_cooling/all_data.json delete mode 100644 fixtures/anna_elga_2_schedule_off/all_data.json delete mode 100644 fixtures/anna_elga_no_cooling/all_data.json delete mode 100644 fixtures/anna_heatpump_cooling/all_data.json delete mode 100644 fixtures/anna_heatpump_cooling_fake_firmware/all_data.json delete mode 100644 fixtures/anna_heatpump_heating/all_data.json delete mode 100644 fixtures/anna_loria_cooling_active/all_data.json delete mode 100644 fixtures/anna_loria_driessens/all_data.json delete mode 100644 fixtures/anna_loria_heating_idle/all_data.json delete mode 100644 fixtures/anna_v4/all_data.json delete mode 100644 fixtures/anna_v4_dhw/all_data.json delete mode 100644 fixtures/anna_v4_no_tag/all_data.json delete mode 100644 fixtures/anna_without_boiler_fw441/all_data.json delete mode 100644 fixtures/legacy_anna/all_data.json delete mode 100644 fixtures/legacy_anna_2/all_data.json delete mode 100644 fixtures/m_adam_cooling/all_data.json delete mode 100644 fixtures/m_adam_heating/all_data.json delete mode 100644 fixtures/m_adam_jip/all_data.json delete mode 100644 fixtures/m_adam_multiple_devices_per_zone/all_data.json delete mode 100644 fixtures/m_anna_heatpump_cooling/all_data.json delete mode 100644 fixtures/m_anna_heatpump_idle/all_data.json delete mode 100644 fixtures/p1v4_442_single/all_data.json delete mode 100644 fixtures/p1v4_442_triple/all_data.json delete mode 100644 fixtures/smile_p1_v2/all_data.json delete mode 100644 fixtures/smile_p1_v2_2/all_data.json delete mode 100644 fixtures/stretch_v23/all_data.json delete mode 100644 fixtures/stretch_v27_no_domain/all_data.json delete mode 100644 fixtures/stretch_v31/all_data.json diff --git a/fixtures/adam_heatpump_cooling/all_data.json b/fixtures/adam_heatpump_cooling/all_data.json deleted file mode 100644 index f2c18acdb..000000000 --- a/fixtures/adam_heatpump_cooling/all_data.json +++ /dev/null @@ -1,809 +0,0 @@ -{ - "devices": { - "04b15f6e884448288f811d29fb7b1b30": { - "active_preset": "away", - "available_schedules": [ - "Opstaan weekdag", - "Werkdag schema", - "Weekend", - "off" - ], - "climate_mode": "cool", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Slaapkamer SJ", - "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], - "select_schedule": "off", - "sensors": { - "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 22.6 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 20.5, - "upper_bound": 99.9 - }, - "thermostats": { - "primary": ["d3a276aeb3114a509bab1e4bf8c40348"], - "secondary": [] - }, - "vendor": "Plugwise" - }, - "0ca13e8176204ca7bf6f09de59f81c83": { - "available": true, - "binary_sensors": { - "cooling_enabled": true, - "cooling_state": false, - "dhw_state": true, - "flame_state": false, - "heating_state": false - }, - "dev_class": "heater_central", - "location": "eedadcb297564f1483faa509179aebed", - "max_dhw_temperature": { - "lower_bound": 40.0, - "resolution": 0.01, - "setpoint": 60.0, - "upper_bound": 65.0 - }, - "maximum_boiler_temperature": { - "lower_bound": 7.0, - "resolution": 0.01, - "setpoint": 35.0, - "upper_bound": 50.0 - }, - "model": "Generic heater/cooler", - "model_id": "17.1", - "name": "OpenTherm", - "sensors": { - "dhw_temperature": 63.5, - "intended_boiler_temperature": 0.0, - "modulation_level": 0.0, - "outdoor_air_temperature": 13.5, - "return_temperature": 24.9, - "water_pressure": 2.0, - "water_temperature": 24.5 - }, - "switches": { - "dhw_cm_switch": true - }, - "vendor": "Remeha B.V." - }, - "1053c8bbf8be43c6921742b146a625f1": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "zone_thermostat", - "firmware": "2016-10-10T02:00:00+02:00", - "hardware": "255", - "location": "b52908550469425b812c87f766fe5303", - "model": "Lisa", - "model_id": "158-01", - "name": "Thermostaat BK", - "sensors": { - "battery": 55, - "setpoint": 18.0, - "temperature": 18.8 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A17" - }, - "1a27dd03b5454c4e8b9e75c8d1afc7af": { - "available": true, - "dev_class": "valve_actuator_plug", - "firmware": "2020-05-13T02:00:00+02:00", - "location": "20e735858f8146cead98b873177a4f99", - "model": "Plug", - "model_id": "160-01", - "name": "Smart Plug DB", - "sensors": { - "electricity_consumed": 0.0, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "relay": false - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A05" - }, - "20e735858f8146cead98b873177a4f99": { - "active_preset": "away", - "available_schedules": [ - "Opstaan weekdag", - "Werkdag schema", - "Weekend", - "off" - ], - "climate_mode": "cool", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Slaapkamer DB", - "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], - "select_schedule": "off", - "sensors": { - "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 22.0 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 18.0, - "upper_bound": 99.9 - }, - "thermostats": { - "primary": ["47e2c550a33846b680725aa3fb229473"], - "secondary": [] - }, - "vendor": "Plugwise" - }, - "2e0fc4db2a6d4cbeb7cf786143543961": { - "available": true, - "dev_class": "valve_actuator_plug", - "firmware": "2020-05-13T02:00:00+02:00", - "location": "a562019b0b1f47a4bde8ebe3dbe3e8a9", - "model": "Plug", - "model_id": "160-01", - "name": "Smart Plug KK", - "sensors": { - "electricity_consumed": 2.13, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A06" - }, - "3b4d2574e2c9443a832b48d19a1c4f06": { - "available": true, - "dev_class": "valve_actuator_plug", - "firmware": "2020-05-13T02:00:00+02:00", - "location": "04b15f6e884448288f811d29fb7b1b30", - "model": "Plug", - "model_id": "160-01", - "name": "Smart Plug SJ", - "sensors": { - "electricity_consumed": 0.0, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "relay": false - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A14" - }, - "3f0afa71f16c45ab964050002560e43c": { - "available": true, - "dev_class": "valve_actuator_plug", - "firmware": "2020-05-13T02:00:00+02:00", - "location": "fa5fa6b34f6b40a0972988b20e888ed4", - "model": "Plug", - "model_id": "160-01", - "name": "Smart Plug WK", - "sensors": { - "electricity_consumed": 0.0, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "relay": false - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A18" - }, - "47e2c550a33846b680725aa3fb229473": { - "available": true, - "dev_class": "zone_thermostat", - "firmware": "2016-10-10T02:00:00+02:00", - "hardware": "255", - "location": "20e735858f8146cead98b873177a4f99", - "model": "Lisa", - "model_id": "158-01", - "name": "Thermostaat DB", - "sensors": { - "setpoint": 18.0, - "temperature": 22.0 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A20" - }, - "5cc21042f87f4b4c94ccb5537c47a53f": { - "active_preset": "away", - "available_schedules": [ - "Opstaan weekdag", - "Werkdag schema", - "Weekend", - "off" - ], - "climate_mode": "auto", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Badkamer 2", - "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], - "select_schedule": "Werkdag schema", - "sensors": { - "electricity_consumed": 0.0, - "temperature": 21.9 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 20.5, - "upper_bound": 99.9 - }, - "thermostats": { - "primary": ["f04c985c11ad4848b8fcd710343f9dcf"], - "secondary": [] - }, - "vendor": "Plugwise" - }, - "5ead63c65e5f44e7870ba2bd680ceb9e": { - "available": true, - "dev_class": "valve_actuator_plug", - "firmware": "2020-05-13T02:00:00+02:00", - "location": "9a27714b970547ee9a6bdadc2b815ad5", - "model": "Plug", - "model_id": "160-01", - "name": "Smart Plug SQ", - "sensors": { - "electricity_consumed": 0.0, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "relay": false - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A15" - }, - "7d97fc3117784cfdafe347bcedcbbbcb": { - "binary_sensors": { - "plugwise_notification": false - }, - "dev_class": "gateway", - "firmware": "3.2.8", - "gateway_modes": ["away", "full", "vacation"], - "hardware": "AME Smile 2.0 board", - "location": "eedadcb297564f1483faa509179aebed", - "mac_address": "012345670001", - "model": "Gateway", - "model_id": "smile_open_therm", - "name": "Adam", - "notifications": {}, - "regulation_modes": [ - "heating", - "off", - "bleeding_cold", - "bleeding_hot", - "cooling" - ], - "select_gateway_mode": "full", - "select_regulation_mode": "cooling", - "sensors": { - "outdoor_temperature": 13.4 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670101" - }, - "7fda9f84f01342f8afe9ebbbbff30c0f": { - "available": true, - "dev_class": "zone_thermostat", - "firmware": "2016-10-10T02:00:00+02:00", - "hardware": "255", - "location": "e39529c79ab54fda9bed26cfc0447546", - "model": "Lisa", - "model_id": "158-01", - "name": "Thermostaat JM", - "sensors": { - "setpoint": 18.0, - "temperature": 20.0 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A01" - }, - "838c2f48195242709b87217cf8d8a71f": { - "available": true, - "dev_class": "valve_actuator_plug", - "firmware": "2020-05-13T02:00:00+02:00", - "location": "b52908550469425b812c87f766fe5303", - "model": "Plug", - "model_id": "160-01", - "name": "Smart Plug BK", - "sensors": { - "electricity_consumed": 0.0, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "relay": false - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A12" - }, - "8a482fa9dddb43acb765d019d8c9838b": { - "available": true, - "dev_class": "valve_actuator_plug", - "firmware": "2020-05-13T02:00:00+02:00", - "location": "5cc21042f87f4b4c94ccb5537c47a53f", - "model": "Plug", - "model_id": "160-01", - "name": "Smart Plug BK2", - "sensors": { - "electricity_consumed": 0.0, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "relay": false - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A10" - }, - "8cf650a4c10c44819e426bed406aec34": { - "active_preset": "away", - "available_schedules": [ - "Opstaan weekdag", - "Werkdag schema", - "Weekend", - "off" - ], - "climate_mode": "auto", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Badkamer 1", - "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], - "select_schedule": "Werkdag schema", - "sensors": { - "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 21.5 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 20.5, - "upper_bound": 99.9 - }, - "thermostats": { - "primary": ["eac5db95d97241f6b17790897847ccf5"], - "secondary": [] - }, - "vendor": "Plugwise" - }, - "93ac3f7bf25342f58cbb77c4a99ac0b3": { - "active_preset": "away", - "available_schedules": [ - "Opstaan weekdag", - "Werkdag schema", - "Weekend", - "off" - ], - "climate_mode": "cool", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Slaapkamer RB", - "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], - "select_schedule": "off", - "sensors": { - "electricity_consumed": 3.13, - "temperature": 20.7 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 17.0, - "upper_bound": 99.9 - }, - "thermostats": { - "primary": ["c4ed311d54e341f58b4cdd201d1fde7e"], - "secondary": [] - }, - "vendor": "Plugwise" - }, - "96714ad90fc948bcbcb5021c4b9f5ae9": { - "available": true, - "dev_class": "valve_actuator_plug", - "firmware": "2020-05-13T02:00:00+02:00", - "location": "e39529c79ab54fda9bed26cfc0447546", - "model": "Plug", - "model_id": "160-01", - "name": "Smart Plug JM", - "sensors": { - "electricity_consumed": 0.0, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "relay": false - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A03" - }, - "9a27714b970547ee9a6bdadc2b815ad5": { - "active_preset": "away", - "available_schedules": [ - "Opstaan weekdag", - "Werkdag schema", - "Weekend", - "off" - ], - "climate_mode": "cool", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Slaapkamer SQ", - "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], - "select_schedule": "off", - "sensors": { - "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 21.4 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 18.5, - "upper_bound": 99.9 - }, - "thermostats": { - "primary": ["beb32da072274e698146db8b022f3c36"], - "secondary": [] - }, - "vendor": "Plugwise" - }, - "a03b6e8e76dd4646af1a77c31dd9370c": { - "available": true, - "dev_class": "valve_actuator_plug", - "firmware": "2020-05-13T02:00:00+02:00", - "location": "93ac3f7bf25342f58cbb77c4a99ac0b3", - "model": "Plug", - "model_id": "160-01", - "name": "Smart Plug RB", - "sensors": { - "electricity_consumed": 3.13, - "electricity_consumed_interval": 0.77, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "relay": false - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A08" - }, - "a562019b0b1f47a4bde8ebe3dbe3e8a9": { - "active_preset": "away", - "available_schedules": [ - "Opstaan weekdag", - "Werkdag schema", - "Weekend", - "off" - ], - "climate_mode": "auto", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Keuken", - "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], - "select_schedule": "Werkdag schema", - "sensors": { - "electricity_consumed": 2.13, - "electricity_produced": 0.0, - "temperature": 22.5 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 21.5, - "upper_bound": 99.9 - }, - "thermostats": { - "primary": ["ea8372c0e3ad4622ad45a041d02425f5"], - "secondary": [] - }, - "vendor": "Plugwise" - }, - "b52908550469425b812c87f766fe5303": { - "active_preset": "away", - "available_schedules": [ - "Opstaan weekdag", - "Werkdag schema", - "Weekend", - "off" - ], - "climate_mode": "cool", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Bijkeuken", - "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], - "select_schedule": "off", - "sensors": { - "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 18.8 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 18.0, - "upper_bound": 99.9 - }, - "thermostats": { - "primary": ["1053c8bbf8be43c6921742b146a625f1"], - "secondary": [] - }, - "vendor": "Plugwise" - }, - "bbcffa48019f4b09b8368bbaf9559e68": { - "available": true, - "dev_class": "valve_actuator_plug", - "firmware": "2020-05-13T02:00:00+02:00", - "location": "8cf650a4c10c44819e426bed406aec34", - "model": "Plug", - "model_id": "160-01", - "name": "Smart Plug BK1", - "sensors": { - "electricity_consumed": 0.0, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "relay": false - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A16" - }, - "beb32da072274e698146db8b022f3c36": { - "available": true, - "dev_class": "zone_thermostat", - "firmware": "2016-10-10T02:00:00+02:00", - "hardware": "255", - "location": "9a27714b970547ee9a6bdadc2b815ad5", - "model": "Lisa", - "model_id": "158-01", - "name": "Thermostaat SQ", - "sensors": { - "setpoint": 18.5, - "temperature": 21.4 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A07" - }, - "c4ed311d54e341f58b4cdd201d1fde7e": { - "available": true, - "dev_class": "zone_thermostat", - "firmware": "2016-10-10T02:00:00+02:00", - "hardware": "255", - "location": "93ac3f7bf25342f58cbb77c4a99ac0b3", - "model": "Lisa", - "model_id": "158-01", - "name": "Thermostaat RB", - "sensors": { - "setpoint": 17.0, - "temperature": 20.7 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A04" - }, - "ca79d23ae0094120b877558734cff85c": { - "dev_class": "thermostat", - "location": "fa5fa6b34f6b40a0972988b20e888ed4", - "model": "ThermoTouch", - "model_id": "143.1", - "name": "Thermostaat WK", - "sensors": { - "setpoint": 21.5, - "temperature": 22.5 - }, - "vendor": "Plugwise" - }, - "d3a276aeb3114a509bab1e4bf8c40348": { - "available": true, - "dev_class": "zone_thermostat", - "firmware": "2016-10-10T02:00:00+02:00", - "hardware": "255", - "location": "04b15f6e884448288f811d29fb7b1b30", - "model": "Lisa", - "model_id": "158-01", - "name": "Thermostaat SJ", - "sensors": { - "setpoint": 20.5, - "temperature": 22.6 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A13" - }, - "e39529c79ab54fda9bed26cfc0447546": { - "active_preset": "away", - "available_schedules": [ - "Opstaan weekdag", - "Werkdag schema", - "Weekend", - "off" - ], - "climate_mode": "cool", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Slaapkamer JM", - "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], - "select_schedule": "off", - "sensors": { - "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 20.0 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 18.0, - "upper_bound": 99.9 - }, - "thermostats": { - "primary": ["7fda9f84f01342f8afe9ebbbbff30c0f"], - "secondary": [] - }, - "vendor": "Plugwise" - }, - "ea8372c0e3ad4622ad45a041d02425f5": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "zone_thermostat", - "firmware": "2016-10-10T02:00:00+02:00", - "hardware": "255", - "location": "a562019b0b1f47a4bde8ebe3dbe3e8a9", - "model": "Lisa", - "model_id": "158-01", - "name": "Thermostaat KK", - "sensors": { - "battery": 53, - "setpoint": 21.5, - "temperature": 22.5 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A02" - }, - "eac5db95d97241f6b17790897847ccf5": { - "available": true, - "dev_class": "zone_thermostat", - "firmware": "2016-10-10T02:00:00+02:00", - "hardware": "255", - "location": "8cf650a4c10c44819e426bed406aec34", - "model": "Lisa", - "model_id": "158-01", - "name": "Thermostaat BK1", - "sensors": { - "setpoint": 20.5, - "temperature": 21.5 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A09" - }, - "f04c985c11ad4848b8fcd710343f9dcf": { - "available": true, - "dev_class": "zone_thermostat", - "firmware": "2016-10-10T02:00:00+02:00", - "hardware": "255", - "location": "5cc21042f87f4b4c94ccb5537c47a53f", - "model": "Lisa", - "model_id": "158-01", - "name": "Thermostaat BK2", - "sensors": { - "setpoint": 20.5, - "temperature": 21.9 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A11" - }, - "fa5fa6b34f6b40a0972988b20e888ed4": { - "active_preset": "away", - "available_schedules": [ - "Opstaan weekdag", - "Werkdag schema", - "Weekend", - "off" - ], - "climate_mode": "auto", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Woonkamer", - "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], - "select_schedule": "Werkdag schema", - "sensors": { - "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 22.5 - }, - "thermostat": { - "lower_bound": 1.0, - "resolution": 0.01, - "setpoint": 21.5, - "upper_bound": 35.0 - }, - "thermostats": { - "primary": ["ca79d23ae0094120b877558734cff85c"], - "secondary": [] - }, - "vendor": "Plugwise" - } - } -} diff --git a/fixtures/adam_jip/all_data.json b/fixtures/adam_jip/all_data.json deleted file mode 100644 index 2f1e40bb7..000000000 --- a/fixtures/adam_jip/all_data.json +++ /dev/null @@ -1,373 +0,0 @@ -{ - "devices": { - "06aecb3d00354375924f50c47af36bd2": { - "active_preset": "no_frost", - "climate_mode": "heat", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Slaapkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "sensors": { - "temperature": 24.2 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 13.0, - "upper_bound": 99.9 - }, - "thermostats": { - "primary": ["1346fbd8498d4dbcab7e18d51b771f3d"], - "secondary": ["356b65335e274d769c338223e7af9c33"] - }, - "vendor": "Plugwise" - }, - "13228dab8ce04617af318a2888b3c548": { - "active_preset": "home", - "climate_mode": "heat", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Woonkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "sensors": { - "temperature": 27.4 - }, - "thermostat": { - "lower_bound": 4.0, - "resolution": 0.01, - "setpoint": 9.0, - "upper_bound": 30.0 - }, - "thermostats": { - "primary": ["f61f1a2535f54f52ad006a3d18e459ca"], - "secondary": ["833de10f269c4deab58fb9df69901b4e"] - }, - "vendor": "Plugwise" - }, - "1346fbd8498d4dbcab7e18d51b771f3d": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "zone_thermostat", - "firmware": "2016-10-27T02:00:00+02:00", - "hardware": "255", - "location": "06aecb3d00354375924f50c47af36bd2", - "model": "Lisa", - "model_id": "158-01", - "name": "Slaapkamer", - "sensors": { - "battery": 92, - "setpoint": 13.0, - "temperature": 24.2 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A03" - }, - "1da4d325838e4ad8aac12177214505c9": { - "available": true, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2020-11-04T01:00:00+01:00", - "hardware": "1", - "location": "d58fec52899f4f1c92e4f8fad6d8c48c", - "model": "Tom/Floor", - "model_id": "106-03", - "name": "Tom Logeerkamer", - "sensors": { - "setpoint": 13.0, - "temperature": 28.8, - "temperature_difference": 2.0, - "valve_position": 0.0 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.1, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A07" - }, - "356b65335e274d769c338223e7af9c33": { - "available": true, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2020-11-04T01:00:00+01:00", - "hardware": "1", - "location": "06aecb3d00354375924f50c47af36bd2", - "model": "Tom/Floor", - "model_id": "106-03", - "name": "Tom Slaapkamer", - "sensors": { - "setpoint": 13.0, - "temperature": 24.2, - "temperature_difference": 1.7, - "valve_position": 0.0 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.1, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A05" - }, - "457ce8414de24596a2d5e7dbc9c7682f": { - "available": true, - "dev_class": "zz_misc_plug", - "location": "9e4433a9d69f40b3aefd15e74395eaec", - "model": "Aqara Smart Plug", - "model_id": "lumi.plug.maeu01", - "name": "Plug", - "sensors": { - "electricity_consumed_interval": 0.0 - }, - "switches": { - "lock": true, - "relay": false - }, - "vendor": "LUMI", - "zigbee_mac_address": "ABCD012345670A06" - }, - "6f3e9d7084214c21b9dfa46f6eeb8700": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "zone_thermostat", - "firmware": "2016-10-27T02:00:00+02:00", - "hardware": "255", - "location": "d27aede973b54be484f6842d1b2802ad", - "model": "Lisa", - "model_id": "158-01", - "name": "Kinderkamer", - "sensors": { - "battery": 79, - "setpoint": 13.0, - "temperature": 30.0 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A02" - }, - "833de10f269c4deab58fb9df69901b4e": { - "available": true, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2020-11-04T01:00:00+01:00", - "hardware": "1", - "location": "13228dab8ce04617af318a2888b3c548", - "model": "Tom/Floor", - "model_id": "106-03", - "name": "Tom Woonkamer", - "sensors": { - "setpoint": 9.0, - "temperature": 24.0, - "temperature_difference": 1.8, - "valve_position": 100 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.1, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A09" - }, - "a6abc6a129ee499c88a4d420cc413b47": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "zone_thermostat", - "firmware": "2016-10-27T02:00:00+02:00", - "hardware": "255", - "location": "d58fec52899f4f1c92e4f8fad6d8c48c", - "model": "Lisa", - "model_id": "158-01", - "name": "Logeerkamer", - "sensors": { - "battery": 80, - "setpoint": 13.0, - "temperature": 30.0 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A01" - }, - "b5c2386c6f6342669e50fe49dd05b188": { - "binary_sensors": { - "plugwise_notification": false - }, - "dev_class": "gateway", - "firmware": "3.2.8", - "gateway_modes": ["away", "full", "vacation"], - "hardware": "AME Smile 2.0 board", - "location": "9e4433a9d69f40b3aefd15e74395eaec", - "mac_address": "012345670001", - "model": "Gateway", - "model_id": "smile_open_therm", - "name": "Adam", - "notifications": {}, - "regulation_modes": ["heating", "off", "bleeding_cold", "bleeding_hot"], - "select_gateway_mode": "full", - "select_regulation_mode": "heating", - "sensors": { - "outdoor_temperature": 24.9 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670101" - }, - "d27aede973b54be484f6842d1b2802ad": { - "active_preset": "home", - "climate_mode": "heat", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Kinderkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "sensors": { - "temperature": 30.0 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 13.0, - "upper_bound": 99.9 - }, - "thermostats": { - "primary": ["6f3e9d7084214c21b9dfa46f6eeb8700"], - "secondary": ["d4496250d0e942cfa7aea3476e9070d5"] - }, - "vendor": "Plugwise" - }, - "d4496250d0e942cfa7aea3476e9070d5": { - "available": true, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2020-11-04T01:00:00+01:00", - "hardware": "1", - "location": "d27aede973b54be484f6842d1b2802ad", - "model": "Tom/Floor", - "model_id": "106-03", - "name": "Tom Kinderkamer", - "sensors": { - "setpoint": 13.0, - "temperature": 28.7, - "temperature_difference": 1.9, - "valve_position": 0.0 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.1, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A04" - }, - "d58fec52899f4f1c92e4f8fad6d8c48c": { - "active_preset": "home", - "climate_mode": "heat", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Logeerkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "sensors": { - "temperature": 30.0 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 13.0, - "upper_bound": 99.9 - }, - "thermostats": { - "primary": ["a6abc6a129ee499c88a4d420cc413b47"], - "secondary": ["1da4d325838e4ad8aac12177214505c9"] - }, - "vendor": "Plugwise" - }, - "e4684553153b44afbef2200885f379dc": { - "available": true, - "binary_sensors": { - "dhw_state": false, - "flame_state": false, - "heating_state": false - }, - "dev_class": "heater_central", - "location": "9e4433a9d69f40b3aefd15e74395eaec", - "max_dhw_temperature": { - "lower_bound": 40.0, - "resolution": 0.01, - "setpoint": 60.0, - "upper_bound": 60.0 - }, - "maximum_boiler_temperature": { - "lower_bound": 20.0, - "resolution": 0.01, - "setpoint": 90.0, - "upper_bound": 90.0 - }, - "model": "Generic heater", - "model_id": "10.20", - "name": "OpenTherm", - "sensors": { - "intended_boiler_temperature": 0.0, - "modulation_level": 0.0, - "return_temperature": 37.1, - "water_pressure": 1.4, - "water_temperature": 37.3 - }, - "switches": { - "dhw_cm_switch": false - }, - "vendor": "Remeha B.V." - }, - "f61f1a2535f54f52ad006a3d18e459ca": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "zone_thermometer", - "firmware": "2020-09-01T02:00:00+02:00", - "hardware": "1", - "location": "13228dab8ce04617af318a2888b3c548", - "model": "Jip", - "model_id": "168-01", - "name": "Woonkamer", - "sensors": { - "battery": 100, - "humidity": 56.2, - "setpoint": 9.0, - "temperature": 27.4 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A08" - } - } -} diff --git a/fixtures/adam_multiple_devices_per_zone/all_data.json b/fixtures/adam_multiple_devices_per_zone/all_data.json deleted file mode 100644 index 8487efd70..000000000 --- a/fixtures/adam_multiple_devices_per_zone/all_data.json +++ /dev/null @@ -1,595 +0,0 @@ -{ - "devices": { - "02cf28bfec924855854c544690a609ef": { - "available": true, - "dev_class": "vcr_plug", - "firmware": "2019-06-21T02:00:00+02:00", - "location": "cd143c07248f491493cea0533bc3d669", - "model": "Plug", - "model_id": "160-01", - "name": "NVR", - "sensors": { - "electricity_consumed": 34.0, - "electricity_consumed_interval": 9.15, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": true, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A15" - }, - "08963fec7c53423ca5680aa4cb502c63": { - "active_preset": "away", - "available_schedules": [ - "CV Roan", - "Bios Schema met Film Avond", - "GF7 Woonkamer", - "Badkamer Schema", - "CV Jessie", - "off" - ], - "climate_mode": "auto", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Badkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "select_schedule": "Badkamer Schema", - "sensors": { - "temperature": 18.9 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 14.0, - "upper_bound": 100.0 - }, - "thermostats": { - "primary": [ - "f1fee6043d3642a9b0a65297455f008e", - "680423ff840043738f42cc7f1ff97a36" - ], - "secondary": [] - }, - "vendor": "Plugwise" - }, - "12493538af164a409c6a1c79e38afe1c": { - "active_preset": "away", - "available_schedules": [ - "CV Roan", - "Bios Schema met Film Avond", - "GF7 Woonkamer", - "Badkamer Schema", - "CV Jessie", - "off" - ], - "climate_mode": "heat", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Bios", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "select_schedule": "off", - "sensors": { - "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 16.5 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 13.0, - "upper_bound": 100.0 - }, - "thermostats": { - "primary": ["df4a4a8169904cdb9c03d61a21f42140"], - "secondary": ["a2c3583e0a6349358998b760cea82d2a"] - }, - "vendor": "Plugwise" - }, - "21f2b542c49845e6bb416884c55778d6": { - "available": true, - "dev_class": "game_console_plug", - "firmware": "2019-06-21T02:00:00+02:00", - "location": "cd143c07248f491493cea0533bc3d669", - "model": "Plug", - "model_id": "160-01", - "name": "Playstation Smart Plug", - "sensors": { - "electricity_consumed": 84.1, - "electricity_consumed_interval": 8.6, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A12" - }, - "446ac08dd04d4eff8ac57489757b7314": { - "active_preset": "no_frost", - "available_schedules": [ - "CV Roan", - "Bios Schema met Film Avond", - "GF7 Woonkamer", - "Badkamer Schema", - "CV Jessie", - "off" - ], - "climate_mode": "heat", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Garage", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "select_schedule": "off", - "sensors": { - "temperature": 15.6 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 5.5, - "upper_bound": 100.0 - }, - "thermostats": { - "primary": ["e7693eb9582644e5b865dba8d4447cf1"], - "secondary": [] - }, - "vendor": "Plugwise" - }, - "4a810418d5394b3f82727340b91ba740": { - "available": true, - "dev_class": "router_plug", - "firmware": "2019-06-21T02:00:00+02:00", - "location": "cd143c07248f491493cea0533bc3d669", - "model": "Plug", - "model_id": "160-01", - "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_plug", - "firmware": "2019-06-21T02:00:00+02:00", - "location": "cd143c07248f491493cea0533bc3d669", - "model": "Plug", - "model_id": "160-01", - "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, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2019-03-27T01:00:00+01:00", - "hardware": "1", - "location": "08963fec7c53423ca5680aa4cb502c63", - "model": "Tom/Floor", - "model_id": "106-03", - "name": "Thermostatic Radiator Badkamer 1", - "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": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "zone_thermostat", - "firmware": "2016-10-27T02:00:00+02:00", - "hardware": "255", - "location": "82fa13f017d240daa0d0ea1775420f24", - "model": "Lisa", - "model_id": "158-01", - "name": "Zone Thermostat 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 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A03" - }, - "78d1126fc4c743db81b61c20e88342a7": { - "available": true, - "dev_class": "central_heating_pump_plug", - "firmware": "2019-06-21T02:00:00+02:00", - "location": "c50f167537524366a5af7aa3942feb1e", - "model": "Plug", - "model_id": "160-01", - "name": "CV Pomp", - "sensors": { - "electricity_consumed": 35.6, - "electricity_consumed_interval": 7.37, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A05" - }, - "82fa13f017d240daa0d0ea1775420f24": { - "active_preset": "asleep", - "available_schedules": [ - "CV Roan", - "Bios Schema met Film Avond", - "GF7 Woonkamer", - "Badkamer Schema", - "CV Jessie", - "off" - ], - "climate_mode": "auto", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Jessie", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "select_schedule": "CV Jessie", - "sensors": { - "temperature": 17.2 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 15.0, - "upper_bound": 100.0 - }, - "thermostats": { - "primary": ["6a3bf693d05e48e0b460c815a4fdd09d"], - "secondary": ["d3da73bde12a47d5a6b8f9dad971f2ec"] - }, - "vendor": "Plugwise" - }, - "90986d591dcd426cae3ec3e8111ff730": { - "binary_sensors": { - "heating_state": true - }, - "dev_class": "heater_central", - "location": "1f9dcf83fd4e4b66b72ff787957bfe5d", - "model": "Unknown", - "name": "OnOff", - "sensors": { - "intended_boiler_temperature": 70.0, - "modulation_level": 1, - "water_temperature": 70.0 - } - }, - "a28f588dc4a049a483fd03a30361ad3a": { - "available": true, - "dev_class": "settop_plug", - "firmware": "2019-06-21T02:00:00+02:00", - "location": "cd143c07248f491493cea0533bc3d669", - "model": "Plug", - "model_id": "160-01", - "name": "Fibaro HC2", - "sensors": { - "electricity_consumed": 12.5, - "electricity_consumed_interval": 3.8, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": true, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A13" - }, - "a2c3583e0a6349358998b760cea82d2a": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2019-03-27T01:00:00+01:00", - "hardware": "1", - "location": "12493538af164a409c6a1c79e38afe1c", - "model": "Tom/Floor", - "model_id": "106-03", - "name": "Bios Cv Thermostatic Radiator ", - "sensors": { - "battery": 62, - "setpoint": 13.0, - "temperature": 17.2, - "temperature_difference": -0.2, - "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": "ABCD012345670A09" - }, - "b310b72a0e354bfab43089919b9a88bf": { - "available": true, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2019-03-27T01:00:00+01:00", - "hardware": "1", - "location": "c50f167537524366a5af7aa3942feb1e", - "model": "Tom/Floor", - "model_id": "106-03", - "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": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "zone_thermostat", - "firmware": "2016-08-02T02:00:00+02:00", - "hardware": "255", - "location": "c50f167537524366a5af7aa3942feb1e", - "model": "Lisa", - "model_id": "158-01", - "name": "Zone Lisa WK", - "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 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A07" - }, - "c50f167537524366a5af7aa3942feb1e": { - "active_preset": "home", - "available_schedules": [ - "CV Roan", - "Bios Schema met Film Avond", - "GF7 Woonkamer", - "Badkamer Schema", - "CV Jessie", - "off" - ], - "climate_mode": "auto", - "control_state": "heating", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Woonkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "select_schedule": "GF7 Woonkamer", - "sensors": { - "electricity_consumed": 35.6, - "electricity_produced": 0.0, - "temperature": 20.9 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 21.5, - "upper_bound": 100.0 - }, - "thermostats": { - "primary": ["b59bcebaf94b499ea7d46e4a66fb62d8"], - "secondary": ["b310b72a0e354bfab43089919b9a88bf"] - }, - "vendor": "Plugwise" - }, - "cd0ddb54ef694e11ac18ed1cbce5dbbd": { - "available": true, - "dev_class": "vcr_plug", - "firmware": "2019-06-21T02:00:00+02:00", - "location": "cd143c07248f491493cea0533bc3d669", - "model": "Plug", - "model_id": "160-01", - "name": "NAS", - "sensors": { - "electricity_consumed": 16.5, - "electricity_consumed_interval": 0.5, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": true, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A14" - }, - "d3da73bde12a47d5a6b8f9dad971f2ec": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2019-03-27T01:00:00+01:00", - "hardware": "1", - "location": "82fa13f017d240daa0d0ea1775420f24", - "model": "Tom/Floor", - "model_id": "106-03", - "name": "Thermostatic Radiator Jessie", - "sensors": { - "battery": 62, - "setpoint": 15.0, - "temperature": 17.1, - "temperature_difference": 0.1, - "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": "ABCD012345670A10" - }, - "df4a4a8169904cdb9c03d61a21f42140": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "zone_thermostat", - "firmware": "2016-10-27T02:00:00+02:00", - "hardware": "255", - "location": "12493538af164a409c6a1c79e38afe1c", - "model": "Lisa", - "model_id": "158-01", - "name": "Zone Lisa Bios", - "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 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A06" - }, - "e7693eb9582644e5b865dba8d4447cf1": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2019-03-27T01:00:00+01:00", - "hardware": "1", - "location": "446ac08dd04d4eff8ac57489757b7314", - "model": "Tom/Floor", - "model_id": "106-03", - "name": "CV Kraan Garage", - "sensors": { - "battery": 68, - "setpoint": 5.5, - "temperature": 15.6, - "temperature_difference": 0.0, - "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": "ABCD012345670A11" - }, - "f1fee6043d3642a9b0a65297455f008e": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2016-10-27T02:00:00+02:00", - "hardware": "255", - "location": "08963fec7c53423ca5680aa4cb502c63", - "model": "Lisa", - "model_id": "158-01", - "name": "Thermostatic Radiator Badkamer 2", - "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 - }, - "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", - "model_id": "smile_open_therm", - "name": "Adam", - "notifications": { - "af82e4ccf9c548528166d38e560662a4": { - "warning": "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device." - } - }, - "select_regulation_mode": "heating", - "sensors": { - "outdoor_temperature": 7.81 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670101" - } - } -} diff --git a/fixtures/adam_onoff_cooling_fake_firmware/all_data.json b/fixtures/adam_onoff_cooling_fake_firmware/all_data.json deleted file mode 100644 index 218667b1e..000000000 --- a/fixtures/adam_onoff_cooling_fake_firmware/all_data.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "devices": { - "0ca13e8176204ca7bf6f09de59f81c83": { - "binary_sensors": { - "cooling_enabled": true, - "cooling_state": true, - "dhw_state": true, - "flame_state": false, - "heating_state": false - }, - "dev_class": "heater_central", - "location": "eedadcb297564f1483faa509179aebed", - "max_dhw_temperature": { - "lower_bound": 40.0, - "resolution": 0.01, - "setpoint": 60.0, - "upper_bound": 65.0 - }, - "maximum_boiler_temperature": { - "lower_bound": 7.0, - "resolution": 0.01, - "setpoint": 35.0, - "upper_bound": 50.0 - }, - "model": "Unknown", - "name": "OnOff", - "sensors": { - "dhw_temperature": 63.5, - "intended_boiler_temperature": 0.0, - "modulation_level": 0.0, - "outdoor_air_temperature": 13.5, - "return_temperature": 24.9, - "water_pressure": 2.0, - "water_temperature": 24.5 - }, - "switches": { - "dhw_cm_switch": true - } - }, - "7d97fc3117784cfdafe347bcedcbbbcb": { - "binary_sensors": { - "plugwise_notification": false - }, - "dev_class": "gateway", - "firmware": "3.2.8", - "gateway_modes": ["away", "full", "vacation"], - "hardware": "AME Smile 2.0 board", - "location": "eedadcb297564f1483faa509179aebed", - "mac_address": "012345670001", - "model": "Gateway", - "model_id": "smile_open_therm", - "name": "Adam", - "notifications": {}, - "regulation_modes": [ - "heating", - "off", - "bleeding_cold", - "bleeding_hot", - "cooling" - ], - "select_gateway_mode": "full", - "select_regulation_mode": "cooling", - "sensors": { - "outdoor_temperature": 13.4 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670101" - }, - "ca79d23ae0094120b877558734cff85c": { - "dev_class": "thermostat", - "location": "fa5fa6b34f6b40a0972988b20e888ed4", - "model": "ThermoTouch", - "model_id": "143.1", - "name": "Thermostaat WK", - "sensors": { - "setpoint": 21.5, - "temperature": 22.5 - }, - "vendor": "Plugwise" - }, - "fa5fa6b34f6b40a0972988b20e888ed4": { - "active_preset": "away", - "available_schedules": [ - "Opstaan weekdag", - "Werkdag schema", - "Weekend", - "off" - ], - "climate_mode": "auto", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Woonkamer", - "preset_modes": ["no_frost", "vacation", "away", "home", "asleep"], - "select_schedule": "Werkdag schema", - "sensors": { - "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 22.5 - }, - "thermostat": { - "lower_bound": 1.0, - "resolution": 0.01, - "setpoint": 21.5, - "upper_bound": 35.0 - }, - "thermostats": { - "primary": ["ca79d23ae0094120b877558734cff85c"], - "secondary": [] - }, - "vendor": "Plugwise" - } - } -} diff --git a/fixtures/adam_plus_anna/all_data.json b/fixtures/adam_plus_anna/all_data.json deleted file mode 100644 index 989c0e948..000000000 --- a/fixtures/adam_plus_anna/all_data.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "devices": { - "009490cc2f674ce6b576863fbb64f867": { - "active_preset": "home", - "available_schedules": ["Weekschema", "off"], - "climate_mode": "auto", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Living room", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "select_schedule": "Weekschema", - "sensors": { - "electricity_consumed": 74.2, - "electricity_produced": 0.0, - "temperature": 20.5 - }, - "thermostat": { - "lower_bound": 1.0, - "resolution": 0.01, - "setpoint": 20.5, - "upper_bound": 35.0 - }, - "thermostats": { - "primary": ["ee62cad889f94e8ca3d09021f03a660b"], - "secondary": [] - }, - "vendor": "Plugwise" - }, - "2743216f626f43948deec1f7ab3b3d70": { - "available": false, - "binary_sensors": { - "dhw_state": false, - "flame_state": false, - "heating_state": false - }, - "dev_class": "heater_central", - "location": "07d618f0bb80412687f065b8698ce3e7", - "maximum_boiler_temperature": { - "lower_bound": 0.0, - "resolution": 1.0, - "setpoint": 80.0, - "upper_bound": 100.0 - }, - "model": "Generic heater", - "name": "OpenTherm", - "sensors": { - "intended_boiler_temperature": 0.0, - "water_temperature": 48.0 - }, - "switches": { - "dhw_cm_switch": false - } - }, - "aa6b0002df0a46e1b1eb94beb61eddfe": { - "available": true, - "dev_class": "hometheater_plug", - "firmware": "2019-06-21T02:00:00+02:00", - "location": "45d410adf8fd461e85cebf16d5ead542", - "model": "Plug", - "model_id": "160-01", - "name": "MediaCenter", - "sensors": { - "electricity_consumed": 10.3, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A01" - }, - "b128b4bbbd1f47e9bf4d756e8fb5ee94": { - "binary_sensors": { - "plugwise_notification": true - }, - "dev_class": "gateway", - "firmware": "3.0.15", - "hardware": "AME Smile 2.0 board", - "location": "07d618f0bb80412687f065b8698ce3e7", - "mac_address": "012345670001", - "model": "Gateway", - "model_id": "smile_open_therm", - "name": "Adam", - "notifications": { - "6fb89e35caeb4b1cb275184895202d84": { - "error": "There is no OpenTherm communication with the boiler." - } - }, - "select_regulation_mode": "heating", - "sensors": { - "outdoor_temperature": 11.9 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670101" - }, - "ee62cad889f94e8ca3d09021f03a660b": { - "dev_class": "thermostat", - "location": "009490cc2f674ce6b576863fbb64f867", - "model": "ThermoTouch", - "model_id": "143.1", - "name": "Anna", - "sensors": { - "setpoint": 20.5, - "temperature": 20.5 - }, - "vendor": "Plugwise" - }, - "f2be121e4a9345ac83c6e99ed89a98be": { - "available": true, - "dev_class": "computer_desktop_plug", - "firmware": "2019-06-21T02:00:00+02:00", - "location": "5ccb6c41a7d9403988d261ceee04239f", - "name": "Work-PC", - "sensors": { - "electricity_consumed": 80.5, - "electricity_consumed_interval": 7.03, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A02" - } - } -} diff --git a/fixtures/adam_plus_anna_new/all_data.json b/fixtures/adam_plus_anna_new/all_data.json deleted file mode 100644 index c060c8082..000000000 --- a/fixtures/adam_plus_anna_new/all_data.json +++ /dev/null @@ -1,288 +0,0 @@ -{ - "devices": { - "056ee145a816487eaa69243c3280f8bf": { - "available": true, - "binary_sensors": { - "dhw_state": false, - "flame_state": true, - "heating_state": true - }, - "dev_class": "heater_central", - "location": "bc93488efab249e5bc54fd7e175a6f91", - "maximum_boiler_temperature": { - "lower_bound": 25.0, - "resolution": 0.01, - "setpoint": 50.0, - "upper_bound": 95.0 - }, - "model": "Generic heater", - "name": "OpenTherm", - "sensors": { - "intended_boiler_temperature": 23.9, - "water_temperature": 30.0 - }, - "switches": { - "dhw_cm_switch": false - } - }, - "10016900610d4c7481df78c89606ef22": { - "available": true, - "dev_class": "valve_actuator_plug", - "location": "d9786723dbcf4f19b5c629a54629f9c7", - "model_id": "TS0011", - "name": "Aanvoer water afsluiter (nous lz3)", - "switches": { - "relay": false - }, - "vendor": "_TZ3000_abjodzas", - "zigbee_mac_address": "A4C13862AF9917B1" - }, - "1772a4ea304041adb83f357b751341ff": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2020-11-04T01:00:00+01:00", - "hardware": "1", - "location": "f871b8c4d63549319221e294e4f88074", - "model": "Tom/Floor", - "model_id": "106-03", - "name": "Tom Badkamer", - "sensors": { - "battery": 99, - "setpoint": 18.0, - "temperature": 17.6, - "temperature_difference": -0.2, - "valve_position": 100 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.1, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "000D6F000C8FF5EE" - }, - "2568cc4b9c1e401495d4741a5f89bee1": { - "available": true, - "dev_class": "hometheater_plug", - "firmware": "2020-11-10T01:00:00+01:00", - "location": "f2bf9048bef64cc5b6d5110154e33c81", - "model": "Plug", - "model_id": "160-01", - "name": "Plug MediaTV", - "sensors": { - "electricity_consumed": 14.8, - "electricity_consumed_interval": 3.0, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": true, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "000D6F000D13CCFD" - }, - "29542b2b6a6a4169acecc15c72a599b8": { - "available": true, - "dev_class": "computer_desktop_plug", - "firmware": "2020-11-10T01:00:00+01:00", - "location": "f2bf9048bef64cc5b6d5110154e33c81", - "model": "Plug", - "model_id": "160-01", - "name": "Plug Werkplek", - "sensors": { - "electricity_consumed": 91.3, - "electricity_consumed_interval": 23.0, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "000D6F000D13CA9A" - }, - "67d73d0bd469422db25a618a5fb8eeb0": { - "available": true, - "dev_class": "heater_central_plug", - "location": "b4f211175e124df59603412bafa77a34", - "model": "Aqara Smart Plug", - "model_id": "lumi.plug.maeu01", - "name": "SmartPlug Floor 0", - "sensors": { - "electricity_consumed_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "LUMI", - "zigbee_mac_address": "54EF4410002C97F2" - }, - "854f8a9b0e7e425db97f1f110e1ce4b3": { - "available": true, - "dev_class": "central_heating_pump_plug", - "firmware": "2020-11-10T01:00:00+01:00", - "location": "f2bf9048bef64cc5b6d5110154e33c81", - "model": "Plug", - "model_id": "160-01", - "name": "Plug Vloerverwarming", - "sensors": { - "electricity_consumed": 43.8, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "000D6F000D13CB6F" - }, - "ad4838d7d35c4d6ea796ee12ae5aedf8": { - "dev_class": "thermostat", - "location": "f2bf9048bef64cc5b6d5110154e33c81", - "model": "ThermoTouch", - "model_id": "143.1", - "name": "Anna", - "sensors": { - "setpoint": 18.5, - "temperature": 18.4 - }, - "vendor": "Plugwise" - }, - "da224107914542988a88561b4452b0f6": { - "binary_sensors": { - "plugwise_notification": false - }, - "dev_class": "gateway", - "firmware": "3.7.8", - "gateway_modes": ["away", "full", "vacation"], - "hardware": "AME Smile 2.0 board", - "location": "bc93488efab249e5bc54fd7e175a6f91", - "mac_address": "012345679891", - "model": "Gateway", - "model_id": "smile_open_therm", - "name": "Adam", - "notifications": {}, - "regulation_modes": ["bleeding_hot", "bleeding_cold", "off", "heating"], - "select_gateway_mode": "full", - "select_regulation_mode": "heating", - "sensors": { - "outdoor_temperature": 9.19 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "000D6F000D5A168D" - }, - "e2f4322d57924fa090fbbc48b3a140dc": { - "available": true, - "binary_sensors": { - "low_battery": true - }, - "dev_class": "zone_thermostat", - "firmware": "2016-10-10T02:00:00+02:00", - "hardware": "255", - "location": "f871b8c4d63549319221e294e4f88074", - "model": "Lisa", - "model_id": "158-01", - "name": "Lisa Badkamer", - "sensors": { - "battery": 14, - "setpoint": 18.0, - "temperature": 16.5 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "000D6F000C869B61" - }, - "e8ef2a01ed3b4139a53bf749204fe6b4": { - "dev_class": "switching", - "members": [ - "2568cc4b9c1e401495d4741a5f89bee1", - "29542b2b6a6a4169acecc15c72a599b8" - ], - "model": "Switchgroup", - "name": "Test", - "switches": { - "relay": true - }, - "vendor": "Plugwise" - }, - "f2bf9048bef64cc5b6d5110154e33c81": { - "active_preset": "home", - "available_schedules": [ - "Badkamer", - "Test", - "Vakantie", - "Weekschema", - "off" - ], - "climate_mode": "auto", - "control_state": "heating", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Living room", - "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], - "select_schedule": "Weekschema", - "sensors": { - "electricity_consumed": 149.9, - "electricity_produced": 0.0, - "temperature": 18.4 - }, - "thermostat": { - "lower_bound": 1.0, - "resolution": 0.01, - "setpoint": 18.5, - "upper_bound": 35.0 - }, - "thermostats": { - "primary": ["ad4838d7d35c4d6ea796ee12ae5aedf8"], - "secondary": [] - }, - "vendor": "Plugwise" - }, - "f871b8c4d63549319221e294e4f88074": { - "active_preset": "home", - "available_schedules": [ - "Badkamer", - "Test", - "Vakantie", - "Weekschema", - "off" - ], - "climate_mode": "auto", - "control_state": "preheating", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Bathroom", - "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], - "select_schedule": "Badkamer", - "sensors": { - "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 16.5 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 18.0, - "upper_bound": 99.9 - }, - "thermostats": { - "primary": ["e2f4322d57924fa090fbbc48b3a140dc"], - "secondary": ["1772a4ea304041adb83f357b751341ff"] - }, - "vendor": "Plugwise" - } - } -} diff --git a/fixtures/adam_plus_anna_new_regulation_off/all_data.json b/fixtures/adam_plus_anna_new_regulation_off/all_data.json deleted file mode 100644 index 97912d874..000000000 --- a/fixtures/adam_plus_anna_new_regulation_off/all_data.json +++ /dev/null @@ -1,288 +0,0 @@ -{ - "devices": { - "056ee145a816487eaa69243c3280f8bf": { - "available": true, - "binary_sensors": { - "dhw_state": false, - "flame_state": false, - "heating_state": false - }, - "dev_class": "heater_central", - "location": "bc93488efab249e5bc54fd7e175a6f91", - "maximum_boiler_temperature": { - "lower_bound": 25.0, - "resolution": 0.01, - "setpoint": 50.0, - "upper_bound": 95.0 - }, - "model": "Generic heater", - "name": "OpenTherm", - "sensors": { - "intended_boiler_temperature": 0.0, - "water_temperature": 30.0 - }, - "switches": { - "dhw_cm_switch": false - } - }, - "10016900610d4c7481df78c89606ef22": { - "available": true, - "dev_class": "valve_actuator_plug", - "location": "d9786723dbcf4f19b5c629a54629f9c7", - "model_id": "TS0011", - "name": "Aanvoer water afsluiter (nous lz3)", - "switches": { - "relay": false - }, - "vendor": "_TZ3000_abjodzas", - "zigbee_mac_address": "A4C13862AF9917B1" - }, - "1772a4ea304041adb83f357b751341ff": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2020-11-04T01:00:00+01:00", - "hardware": "1", - "location": "f871b8c4d63549319221e294e4f88074", - "model": "Tom/Floor", - "model_id": "106-03", - "name": "Tom Badkamer", - "sensors": { - "battery": 99, - "setpoint": 18.0, - "temperature": 21.6, - "temperature_difference": -0.2, - "valve_position": 100 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.1, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "000D6F000C8FF5EE" - }, - "2568cc4b9c1e401495d4741a5f89bee1": { - "available": true, - "dev_class": "hometheater_plug", - "firmware": "2020-11-10T01:00:00+01:00", - "location": "f2bf9048bef64cc5b6d5110154e33c81", - "model": "Plug", - "model_id": "160-01", - "name": "Plug MediaTV", - "sensors": { - "electricity_consumed": 14.8, - "electricity_consumed_interval": 3.0, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": true, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "000D6F000D13CCFD" - }, - "29542b2b6a6a4169acecc15c72a599b8": { - "available": true, - "dev_class": "computer_desktop_plug", - "firmware": "2020-11-10T01:00:00+01:00", - "location": "f2bf9048bef64cc5b6d5110154e33c81", - "model": "Plug", - "model_id": "160-01", - "name": "Plug Werkplek", - "sensors": { - "electricity_consumed": 91.3, - "electricity_consumed_interval": 23.0, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "000D6F000D13CA9A" - }, - "67d73d0bd469422db25a618a5fb8eeb0": { - "available": true, - "dev_class": "heater_central_plug", - "location": "b4f211175e124df59603412bafa77a34", - "model": "Aqara Smart Plug", - "model_id": "lumi.plug.maeu01", - "name": "SmartPlug Floor 0", - "sensors": { - "electricity_consumed_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "LUMI", - "zigbee_mac_address": "54EF4410002C97F2" - }, - "854f8a9b0e7e425db97f1f110e1ce4b3": { - "available": true, - "dev_class": "central_heating_pump_plug", - "firmware": "2020-11-10T01:00:00+01:00", - "location": "f2bf9048bef64cc5b6d5110154e33c81", - "model": "Plug", - "model_id": "160-01", - "name": "Plug Vloerverwarming", - "sensors": { - "electricity_consumed": 43.8, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "000D6F000D13CB6F" - }, - "ad4838d7d35c4d6ea796ee12ae5aedf8": { - "dev_class": "thermostat", - "location": "f2bf9048bef64cc5b6d5110154e33c81", - "model": "ThermoTouch", - "model_id": "143.1", - "name": "Anna", - "sensors": { - "setpoint": 18.5, - "temperature": 22.4 - }, - "vendor": "Plugwise" - }, - "da224107914542988a88561b4452b0f6": { - "binary_sensors": { - "plugwise_notification": false - }, - "dev_class": "gateway", - "firmware": "3.7.8", - "gateway_modes": ["away", "full", "vacation"], - "hardware": "AME Smile 2.0 board", - "location": "bc93488efab249e5bc54fd7e175a6f91", - "mac_address": "012345679891", - "model": "Gateway", - "model_id": "smile_open_therm", - "name": "Adam", - "notifications": {}, - "regulation_modes": ["bleeding_hot", "bleeding_cold", "off", "heating"], - "select_gateway_mode": "full", - "select_regulation_mode": "off", - "sensors": { - "outdoor_temperature": 9.19 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "000D6F000D5A168D" - }, - "e2f4322d57924fa090fbbc48b3a140dc": { - "available": true, - "binary_sensors": { - "low_battery": true - }, - "dev_class": "zone_thermostat", - "firmware": "2016-10-10T02:00:00+02:00", - "hardware": "255", - "location": "f871b8c4d63549319221e294e4f88074", - "model": "Lisa", - "model_id": "158-01", - "name": "Lisa Badkamer", - "sensors": { - "battery": 14, - "setpoint": 18.0, - "temperature": 21.5 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "000D6F000C869B61" - }, - "e8ef2a01ed3b4139a53bf749204fe6b4": { - "dev_class": "switching", - "members": [ - "2568cc4b9c1e401495d4741a5f89bee1", - "29542b2b6a6a4169acecc15c72a599b8" - ], - "model": "Switchgroup", - "name": "Test", - "switches": { - "relay": true - }, - "vendor": "Plugwise" - }, - "f2bf9048bef64cc5b6d5110154e33c81": { - "active_preset": "home", - "available_schedules": [ - "Badkamer", - "Test", - "Vakantie", - "Weekschema", - "off" - ], - "climate_mode": "off", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Living room", - "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], - "select_schedule": "off", - "sensors": { - "electricity_consumed": 149.9, - "electricity_produced": 0.0, - "temperature": 22.4 - }, - "thermostat": { - "lower_bound": 1.0, - "resolution": 0.01, - "setpoint": 18.5, - "upper_bound": 35.0 - }, - "thermostats": { - "primary": ["ad4838d7d35c4d6ea796ee12ae5aedf8"], - "secondary": [] - }, - "vendor": "Plugwise" - }, - "f871b8c4d63549319221e294e4f88074": { - "active_preset": "home", - "available_schedules": [ - "Badkamer", - "Test", - "Vakantie", - "Weekschema", - "off" - ], - "climate_mode": "off", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Bathroom", - "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], - "select_schedule": "off", - "sensors": { - "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 21.5 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 18.0, - "upper_bound": 99.9 - }, - "thermostats": { - "primary": ["e2f4322d57924fa090fbbc48b3a140dc"], - "secondary": ["1772a4ea304041adb83f357b751341ff"] - }, - "vendor": "Plugwise" - } - } -} diff --git a/fixtures/adam_zone_per_device/all_data.json b/fixtures/adam_zone_per_device/all_data.json deleted file mode 100644 index ae2f75370..000000000 --- a/fixtures/adam_zone_per_device/all_data.json +++ /dev/null @@ -1,592 +0,0 @@ -{ - "devices": { - "02cf28bfec924855854c544690a609ef": { - "available": true, - "dev_class": "vcr_plug", - "firmware": "2019-06-21T02:00:00+02:00", - "location": "c4d2bda6df8146caa2e5c2b5dc65660e", - "model": "Plug", - "model_id": "160-01", - "name": "NVR", - "sensors": { - "electricity_consumed": 34.0, - "electricity_consumed_interval": 8.65, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": true, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A15" - }, - "08963fec7c53423ca5680aa4cb502c63": { - "active_preset": "away", - "available_schedules": [ - "CV Roan", - "Bios Schema met Film Avond", - "GF7 Woonkamer", - "Badkamer Schema", - "CV Jessie", - "off" - ], - "climate_mode": "auto", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Badkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "select_schedule": "Badkamer Schema", - "sensors": { - "temperature": 18.8 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 14.0, - "upper_bound": 100.0 - }, - "thermostats": { - "primary": ["f1fee6043d3642a9b0a65297455f008e"], - "secondary": ["680423ff840043738f42cc7f1ff97a36"] - }, - "vendor": "Plugwise" - }, - "12493538af164a409c6a1c79e38afe1c": { - "active_preset": "away", - "available_schedules": [ - "CV Roan", - "Bios Schema met Film Avond", - "GF7 Woonkamer", - "Badkamer Schema", - "CV Jessie", - "off" - ], - "climate_mode": "heat", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Bios", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "select_schedule": "off", - "sensors": { - "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 16.5 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 13.0, - "upper_bound": 100.0 - }, - "thermostats": { - "primary": ["df4a4a8169904cdb9c03d61a21f42140"], - "secondary": ["a2c3583e0a6349358998b760cea82d2a"] - }, - "vendor": "Plugwise" - }, - "21f2b542c49845e6bb416884c55778d6": { - "available": true, - "dev_class": "game_console_plug", - "firmware": "2019-06-21T02:00:00+02:00", - "location": "4efbab4c8bb84fbab26c8decf670eb96", - "model": "Plug", - "model_id": "160-01", - "name": "Playstation Smart Plug", - "sensors": { - "electricity_consumed": 80.1, - "electricity_consumed_interval": 12.7, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A12" - }, - "446ac08dd04d4eff8ac57489757b7314": { - "active_preset": "no_frost", - "available_schedules": [ - "CV Roan", - "Bios Schema met Film Avond", - "GF7 Woonkamer", - "Badkamer Schema", - "CV Jessie", - "off" - ], - "climate_mode": "heat", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Garage", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "select_schedule": "off", - "sensors": { - "temperature": 15.6 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 5.5, - "upper_bound": 100.0 - }, - "thermostats": { - "primary": ["e7693eb9582644e5b865dba8d4447cf1"], - "secondary": [] - }, - "vendor": "Plugwise" - }, - "4a810418d5394b3f82727340b91ba740": { - "available": true, - "dev_class": "router_plug", - "firmware": "2019-06-21T02:00:00+02:00", - "location": "0217e9743c174eef9d6e9f680d403ce2", - "model": "Plug", - "model_id": "160-01", - "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_plug", - "firmware": "2019-06-21T02:00:00+02:00", - "location": "2b1591ecf6344d4d93b03dece9747648", - "model": "Plug", - "model_id": "160-01", - "name": "Ziggo Modem", - "sensors": { - "electricity_consumed": 12.2, - "electricity_consumed_interval": 2.8, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": true, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A01" - }, - "680423ff840043738f42cc7f1ff97a36": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2019-03-27T01:00:00+01:00", - "hardware": "1", - "location": "08963fec7c53423ca5680aa4cb502c63", - "model": "Tom/Floor", - "model_id": "106-03", - "name": "Thermostatic Radiator Badkamer", - "sensors": { - "battery": 51, - "setpoint": 14.0, - "temperature": 19.1, - "temperature_difference": -0.3, - "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": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "zone_thermostat", - "firmware": "2016-10-27T02:00:00+02:00", - "hardware": "255", - "location": "82fa13f017d240daa0d0ea1775420f24", - "model": "Lisa", - "model_id": "158-01", - "name": "Zone Thermostat Jessie", - "sensors": { - "battery": 37, - "setpoint": 16.0, - "temperature": 17.1 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A03" - }, - "78d1126fc4c743db81b61c20e88342a7": { - "available": true, - "dev_class": "central_heating_pump_plug", - "firmware": "2019-06-21T02:00:00+02:00", - "location": "c50f167537524366a5af7aa3942feb1e", - "model": "Plug", - "model_id": "160-01", - "name": "CV Pomp", - "sensors": { - "electricity_consumed": 35.8, - "electricity_consumed_interval": 5.85, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A05" - }, - "82fa13f017d240daa0d0ea1775420f24": { - "active_preset": "asleep", - "available_schedules": [ - "CV Roan", - "Bios Schema met Film Avond", - "GF7 Woonkamer", - "Badkamer Schema", - "CV Jessie", - "off" - ], - "climate_mode": "auto", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Jessie", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "select_schedule": "CV Jessie", - "sensors": { - "temperature": 17.1 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 16.0, - "upper_bound": 100.0 - }, - "thermostats": { - "primary": ["6a3bf693d05e48e0b460c815a4fdd09d"], - "secondary": ["d3da73bde12a47d5a6b8f9dad971f2ec"] - }, - "vendor": "Plugwise" - }, - "90986d591dcd426cae3ec3e8111ff730": { - "binary_sensors": { - "heating_state": true - }, - "dev_class": "heater_central", - "location": "1f9dcf83fd4e4b66b72ff787957bfe5d", - "model": "Unknown", - "name": "OnOff", - "sensors": { - "intended_boiler_temperature": 70.0, - "modulation_level": 1, - "water_temperature": 70.0 - } - }, - "a28f588dc4a049a483fd03a30361ad3a": { - "available": true, - "dev_class": "settop_plug", - "firmware": "2019-06-21T02:00:00+02:00", - "location": "cd143c07248f491493cea0533bc3d669", - "model": "Plug", - "model_id": "160-01", - "name": "Fibaro HC2", - "sensors": { - "electricity_consumed": 12.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": "ABCD012345670A13" - }, - "a2c3583e0a6349358998b760cea82d2a": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2019-03-27T01:00:00+01:00", - "hardware": "1", - "location": "12493538af164a409c6a1c79e38afe1c", - "model": "Tom/Floor", - "model_id": "106-03", - "name": "Bios Cv Thermostatic Radiator ", - "sensors": { - "battery": 62, - "setpoint": 13.0, - "temperature": 17.1, - "temperature_difference": -0.1, - "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": "ABCD012345670A09" - }, - "b310b72a0e354bfab43089919b9a88bf": { - "available": true, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2019-03-27T01:00:00+01:00", - "hardware": "1", - "location": "c50f167537524366a5af7aa3942feb1e", - "model": "Tom/Floor", - "model_id": "106-03", - "name": "Floor kraan", - "sensors": { - "setpoint": 21.5, - "temperature": 26.2, - "temperature_difference": 3.7, - "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": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "zone_thermostat", - "firmware": "2016-08-02T02:00:00+02:00", - "hardware": "255", - "location": "c50f167537524366a5af7aa3942feb1e", - "model": "Lisa", - "model_id": "158-01", - "name": "Zone Lisa WK", - "sensors": { - "battery": 34, - "setpoint": 21.5, - "temperature": 21.1 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A07" - }, - "c50f167537524366a5af7aa3942feb1e": { - "active_preset": "home", - "available_schedules": [ - "CV Roan", - "Bios Schema met Film Avond", - "GF7 Woonkamer", - "Badkamer Schema", - "CV Jessie", - "off" - ], - "climate_mode": "auto", - "control_state": "heating", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Woonkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "select_schedule": "GF7 Woonkamer", - "sensors": { - "electricity_consumed": 35.8, - "electricity_produced": 0.0, - "temperature": 21.1 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 21.5, - "upper_bound": 100.0 - }, - "thermostats": { - "primary": ["b59bcebaf94b499ea7d46e4a66fb62d8"], - "secondary": ["b310b72a0e354bfab43089919b9a88bf"] - }, - "vendor": "Plugwise" - }, - "cd0ddb54ef694e11ac18ed1cbce5dbbd": { - "available": true, - "dev_class": "vcr_plug", - "firmware": "2019-06-21T02:00:00+02:00", - "location": "e704bae65654496f9cade9c855decdfe", - "model": "Plug", - "model_id": "160-01", - "name": "NAS", - "sensors": { - "electricity_consumed": 16.5, - "electricity_consumed_interval": 0.29, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": true, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A14" - }, - "d3da73bde12a47d5a6b8f9dad971f2ec": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2019-03-27T01:00:00+01:00", - "hardware": "1", - "location": "82fa13f017d240daa0d0ea1775420f24", - "model": "Tom/Floor", - "model_id": "106-03", - "name": "Thermostatic Radiator Jessie", - "sensors": { - "battery": 62, - "setpoint": 16.0, - "temperature": 16.9, - "temperature_difference": 0.1, - "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": "ABCD012345670A10" - }, - "df4a4a8169904cdb9c03d61a21f42140": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "zone_thermostat", - "firmware": "2016-10-27T02:00:00+02:00", - "hardware": "255", - "location": "12493538af164a409c6a1c79e38afe1c", - "model": "Lisa", - "model_id": "158-01", - "name": "Zone Lisa Bios", - "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 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A06" - }, - "e7693eb9582644e5b865dba8d4447cf1": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2019-03-27T01:00:00+01:00", - "hardware": "1", - "location": "446ac08dd04d4eff8ac57489757b7314", - "model": "Tom/Floor", - "model_id": "106-03", - "name": "CV Kraan Garage", - "sensors": { - "battery": 68, - "setpoint": 5.5, - "temperature": 15.6, - "temperature_difference": 0.1, - "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": "ABCD012345670A11" - }, - "f1fee6043d3642a9b0a65297455f008e": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "zone_thermostat", - "firmware": "2016-10-27T02:00:00+02:00", - "hardware": "255", - "location": "08963fec7c53423ca5680aa4cb502c63", - "model": "Lisa", - "model_id": "158-01", - "name": "Zone Thermostat Badkamer", - "sensors": { - "battery": 92, - "setpoint": 14.0, - "temperature": 18.8 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "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", - "model_id": "smile_open_therm", - "name": "Adam", - "notifications": { - "af82e4ccf9c548528166d38e560662a4": { - "warning": "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device." - } - }, - "select_regulation_mode": "heating", - "sensors": { - "outdoor_temperature": 7.69 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670101" - } - } -} diff --git a/fixtures/anna_elga_2/all_data.json b/fixtures/anna_elga_2/all_data.json deleted file mode 100644 index 30e96f68a..000000000 --- a/fixtures/anna_elga_2/all_data.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "devices": { - "573c152e7d4f4720878222bd75638f5b": { - "available": true, - "binary_sensors": { - "compressor_state": true, - "cooling_enabled": false, - "cooling_state": false, - "dhw_state": false, - "flame_state": true, - "heating_state": true, - "secondary_boiler_state": true - }, - "dev_class": "heater_central", - "location": "d34dfe6ab90b410c98068e75de3eb631", - "model": "Generic heater/cooler", - "name": "OpenTherm", - "sensors": { - "domestic_hot_water_setpoint": 60.0, - "intended_boiler_temperature": 58.3, - "modulation_level": 55, - "outdoor_air_temperature": 6.0, - "return_temperature": 35.5, - "water_pressure": 0.5, - "water_temperature": 42.6 - }, - "switches": { - "dhw_cm_switch": false - }, - "vendor": "Techneco" - }, - "ebd90df1ab334565b5895f37590ccff4": { - "active_preset": "home", - "available_schedules": ["Thermostat schedule", "off"], - "climate_mode": "auto", - "control_state": "heating", - "dev_class": "thermostat", - "firmware": "2018-02-08T11:15:53+01:00", - "hardware": "6539-1301-5002", - "location": "d3ce834534114348be628b61b26d9220", - "model": "ThermoTouch", - "name": "Anna", - "preset_modes": ["away", "no_frost", "vacation", "home", "asleep"], - "select_schedule": "Thermostat schedule", - "sensors": { - "cooling_activation_outdoor_temperature": 24.0, - "cooling_deactivation_threshold": 2.0, - "illuminance": 0.5, - "setpoint_high": 30.0, - "setpoint_low": 19.5, - "temperature": 19.2 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "thermostat": { - "lower_bound": 4.0, - "resolution": 0.1, - "setpoint_high": 30.0, - "setpoint_low": 19.5, - "upper_bound": 30.0 - }, - "vendor": "Plugwise" - }, - "fb49af122f6e4b0f91267e1cf7666d6f": { - "binary_sensors": { - "plugwise_notification": false - }, - "dev_class": "gateway", - "firmware": "4.4.1", - "hardware": "AME Smile 2.0 board", - "location": "d34dfe6ab90b410c98068e75de3eb631", - "mac_address": "C4930002FE76", - "model": "Gateway", - "model_id": "smile_thermo", - "name": "Smile Anna", - "notifications": {}, - "sensors": { - "outdoor_temperature": 6.38 - }, - "vendor": "Plugwise" - } - } -} diff --git a/fixtures/anna_elga_2_cooling/all_data.json b/fixtures/anna_elga_2_cooling/all_data.json deleted file mode 100644 index fe46b6d0a..000000000 --- a/fixtures/anna_elga_2_cooling/all_data.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "devices": { - "573c152e7d4f4720878222bd75638f5b": { - "available": true, - "binary_sensors": { - "compressor_state": true, - "cooling_enabled": true, - "cooling_state": true, - "dhw_state": false, - "flame_state": false, - "heating_state": false, - "secondary_boiler_state": false - }, - "dev_class": "heater_central", - "location": "d34dfe6ab90b410c98068e75de3eb631", - "maximum_boiler_temperature": { - "lower_bound": 0.0, - "resolution": 1.0, - "setpoint": 60.0, - "upper_bound": 100.0 - }, - "model": "Generic heater/cooler", - "name": "OpenTherm", - "sensors": { - "domestic_hot_water_setpoint": 60.0, - "intended_boiler_temperature": 0.0, - "modulation_level": 0.0, - "outdoor_air_temperature": 30.0, - "return_temperature": 23.4, - "water_pressure": 0.5, - "water_temperature": 22.8 - }, - "switches": { - "dhw_cm_switch": true - }, - "vendor": "Techneco" - }, - "ebd90df1ab334565b5895f37590ccff4": { - "active_preset": "home", - "available_schedules": ["Thermostat schedule", "off"], - "climate_mode": "auto", - "control_state": "cooling", - "dev_class": "thermostat", - "firmware": "2018-02-08T11:15:53+01:00", - "hardware": "6539-1301-5002", - "location": "d3ce834534114348be628b61b26d9220", - "model": "ThermoTouch", - "name": "Anna", - "preset_modes": ["away", "no_frost", "vacation", "home", "asleep"], - "select_schedule": "Thermostat schedule", - "sensors": { - "cooling_activation_outdoor_temperature": 26.0, - "cooling_deactivation_threshold": 3.0, - "illuminance": 0.5, - "setpoint_high": 23.0, - "setpoint_low": 4.0, - "temperature": 24.9 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "thermostat": { - "lower_bound": 4.0, - "resolution": 0.1, - "setpoint_high": 23.0, - "setpoint_low": 4.0, - "upper_bound": 30.0 - }, - "vendor": "Plugwise" - }, - "fb49af122f6e4b0f91267e1cf7666d6f": { - "binary_sensors": { - "plugwise_notification": false - }, - "dev_class": "gateway", - "firmware": "4.2.1", - "hardware": "AME Smile 2.0 board", - "location": "d34dfe6ab90b410c98068e75de3eb631", - "mac_address": "C4930002FE76", - "model": "Gateway", - "model_id": "smile_thermo", - "name": "Smile Anna", - "notifications": {}, - "sensors": { - "outdoor_temperature": 31.0 - }, - "vendor": "Plugwise" - } - } -} diff --git a/fixtures/anna_elga_2_schedule_off/all_data.json b/fixtures/anna_elga_2_schedule_off/all_data.json deleted file mode 100644 index 4876a4416..000000000 --- a/fixtures/anna_elga_2_schedule_off/all_data.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "devices": { - "573c152e7d4f4720878222bd75638f5b": { - "available": true, - "binary_sensors": { - "compressor_state": false, - "cooling_enabled": false, - "cooling_state": false, - "dhw_state": false, - "flame_state": false, - "heating_state": false, - "secondary_boiler_state": false - }, - "dev_class": "heater_central", - "location": "d34dfe6ab90b410c98068e75de3eb631", - "maximum_boiler_temperature": { - "lower_bound": 0.0, - "resolution": 1.0, - "setpoint": 60.0, - "upper_bound": 100.0 - }, - "model": "Generic heater/cooler", - "name": "OpenTherm", - "sensors": { - "domestic_hot_water_setpoint": 60.0, - "intended_boiler_temperature": 0.0, - "modulation_level": 0.0, - "outdoor_air_temperature": 13.0, - "return_temperature": 23.4, - "water_pressure": 0.5, - "water_temperature": 22.8 - }, - "switches": { - "dhw_cm_switch": true - }, - "vendor": "Techneco" - }, - "ebd90df1ab334565b5895f37590ccff4": { - "active_preset": "home", - "available_schedules": ["Thermostat schedule", "off"], - "climate_mode": "heat_cool", - "control_state": "idle", - "dev_class": "thermostat", - "firmware": "2018-02-08T11:15:53+01:00", - "hardware": "6539-1301-5002", - "location": "d3ce834534114348be628b61b26d9220", - "model": "ThermoTouch", - "name": "Anna", - "preset_modes": ["away", "no_frost", "vacation", "home", "asleep"], - "select_schedule": "off", - "sensors": { - "cooling_activation_outdoor_temperature": 26.0, - "cooling_deactivation_threshold": 3.0, - "illuminance": 0.5, - "setpoint_high": 30.0, - "setpoint_low": 19.5, - "temperature": 20.9 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "thermostat": { - "lower_bound": 4.0, - "resolution": 0.1, - "setpoint_high": 30.0, - "setpoint_low": 19.5, - "upper_bound": 30.0 - }, - "vendor": "Plugwise" - }, - "fb49af122f6e4b0f91267e1cf7666d6f": { - "binary_sensors": { - "plugwise_notification": false - }, - "dev_class": "gateway", - "firmware": "4.2.1", - "hardware": "AME Smile 2.0 board", - "location": "d34dfe6ab90b410c98068e75de3eb631", - "mac_address": "C4930002FE76", - "model": "Gateway", - "model_id": "smile_thermo", - "name": "Smile Anna", - "notifications": {}, - "sensors": { - "outdoor_temperature": 13.0 - }, - "vendor": "Plugwise" - } - } -} diff --git a/fixtures/anna_elga_no_cooling/all_data.json b/fixtures/anna_elga_no_cooling/all_data.json deleted file mode 100644 index aa775140f..000000000 --- a/fixtures/anna_elga_no_cooling/all_data.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "devices": { - "015ae9ea3f964e668e490fa39da3870b": { - "binary_sensors": { - "plugwise_notification": false - }, - "dev_class": "gateway", - "firmware": "4.0.15", - "hardware": "AME Smile 2.0 board", - "location": "a57efe5f145f498c9be62a9b63626fbf", - "mac_address": "012345670001", - "model": "Gateway", - "model_id": "smile_thermo", - "name": "Smile Anna", - "notifications": {}, - "sensors": { - "outdoor_temperature": 20.2 - }, - "vendor": "Plugwise" - }, - "1cbf783bb11e4a7c8a6843dee3a86927": { - "available": true, - "binary_sensors": { - "compressor_state": true, - "dhw_state": false, - "flame_state": false, - "heating_state": true, - "secondary_boiler_state": false - }, - "dev_class": "heater_central", - "location": "a57efe5f145f498c9be62a9b63626fbf", - "max_dhw_temperature": { - "lower_bound": 35.0, - "resolution": 0.01, - "setpoint": 53.0, - "upper_bound": 60.0 - }, - "maximum_boiler_temperature": { - "lower_bound": 0.0, - "resolution": 1.0, - "setpoint": 60.0, - "upper_bound": 100.0 - }, - "model": "Generic heater", - "name": "OpenTherm", - "sensors": { - "dhw_temperature": 46.3, - "intended_boiler_temperature": 35.0, - "modulation_level": 52, - "outdoor_air_temperature": 3.0, - "return_temperature": 25.1, - "water_pressure": 1.57, - "water_temperature": 29.1 - }, - "switches": { - "dhw_cm_switch": false - }, - "vendor": "Techneco" - }, - "3cb70739631c4d17a86b8b12e8a5161b": { - "active_preset": "home", - "available_schedules": ["standaard", "off"], - "climate_mode": "auto", - "control_state": "heating", - "dev_class": "thermostat", - "firmware": "2018-02-08T11:15:53+01:00", - "hardware": "6539-1301-5002", - "location": "c784ee9fdab44e1395b8dee7d7a497d5", - "model": "ThermoTouch", - "name": "Anna", - "preset_modes": ["no_frost", "home", "away", "asleep", "vacation"], - "select_schedule": "standaard", - "sensors": { - "cooling_activation_outdoor_temperature": 21.0, - "cooling_deactivation_threshold": 4.0, - "illuminance": 86.0, - "setpoint": 20.5, - "temperature": 19.3 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": -0.5, - "upper_bound": 2.0 - }, - "thermostat": { - "lower_bound": 4.0, - "resolution": 0.1, - "setpoint": 20.5, - "upper_bound": 30.0 - }, - "vendor": "Plugwise" - } - } -} diff --git a/fixtures/anna_heatpump_cooling/all_data.json b/fixtures/anna_heatpump_cooling/all_data.json deleted file mode 100644 index 80cf40202..000000000 --- a/fixtures/anna_heatpump_cooling/all_data.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "devices": { - "015ae9ea3f964e668e490fa39da3870b": { - "binary_sensors": { - "plugwise_notification": false - }, - "dev_class": "gateway", - "firmware": "4.0.15", - "hardware": "AME Smile 2.0 board", - "location": "a57efe5f145f498c9be62a9b63626fbf", - "mac_address": "012345670001", - "model": "Gateway", - "model_id": "smile_thermo", - "name": "Smile Anna", - "notifications": {}, - "sensors": { - "outdoor_temperature": 22.0 - }, - "vendor": "Plugwise" - }, - "1cbf783bb11e4a7c8a6843dee3a86927": { - "available": true, - "binary_sensors": { - "compressor_state": true, - "cooling_enabled": true, - "cooling_state": true, - "dhw_state": false, - "flame_state": false, - "heating_state": false, - "secondary_boiler_state": false - }, - "dev_class": "heater_central", - "location": "a57efe5f145f498c9be62a9b63626fbf", - "maximum_boiler_temperature": { - "lower_bound": 0.0, - "resolution": 1.0, - "setpoint": 60.0, - "upper_bound": 100.0 - }, - "model": "Generic heater/cooler", - "name": "OpenTherm", - "sensors": { - "dhw_temperature": 41.5, - "domestic_hot_water_setpoint": 60.0, - "intended_boiler_temperature": 0.0, - "modulation_level": 40, - "outdoor_air_temperature": 22.0, - "return_temperature": 23.8, - "water_pressure": 1.61, - "water_temperature": 24.7 - }, - "switches": { - "dhw_cm_switch": false - }, - "vendor": "Techneco" - }, - "3cb70739631c4d17a86b8b12e8a5161b": { - "active_preset": "home", - "available_schedules": ["standaard", "off"], - "climate_mode": "heat_cool", - "control_state": "cooling", - "dev_class": "thermostat", - "firmware": "2018-02-08T11:15:53+01:00", - "hardware": "6539-1301-5002", - "location": "c784ee9fdab44e1395b8dee7d7a497d5", - "model": "ThermoTouch", - "name": "Anna", - "preset_modes": ["no_frost", "home", "away", "asleep", "vacation"], - "select_schedule": "off", - "sensors": { - "cooling_activation_outdoor_temperature": 21.0, - "cooling_deactivation_threshold": 6.0, - "illuminance": 24.5, - "setpoint_high": 22.0, - "setpoint_low": 4.0, - "temperature": 22.3 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": -0.5, - "upper_bound": 2.0 - }, - "thermostat": { - "lower_bound": 4.0, - "resolution": 0.1, - "setpoint_high": 22.0, - "setpoint_low": 4.0, - "upper_bound": 30.0 - }, - "vendor": "Plugwise" - } - } -} diff --git a/fixtures/anna_heatpump_cooling_fake_firmware/all_data.json b/fixtures/anna_heatpump_cooling_fake_firmware/all_data.json deleted file mode 100644 index b80a30493..000000000 --- a/fixtures/anna_heatpump_cooling_fake_firmware/all_data.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "devices": { - "015ae9ea3f964e668e490fa39da3870b": { - "binary_sensors": { - "plugwise_notification": false - }, - "dev_class": "gateway", - "firmware": "4.10.10", - "hardware": "AME Smile 2.0 board", - "location": "a57efe5f145f498c9be62a9b63626fbf", - "mac_address": "012345670001", - "model": "Gateway", - "model_id": "smile_thermo", - "name": "Smile Anna", - "notifications": {}, - "sensors": { - "outdoor_temperature": 22.0 - }, - "vendor": "Plugwise" - }, - "1cbf783bb11e4a7c8a6843dee3a86927": { - "available": true, - "binary_sensors": { - "compressor_state": true, - "cooling_enabled": true, - "cooling_state": true, - "dhw_state": false, - "flame_state": false, - "heating_state": false, - "secondary_boiler_state": false - }, - "dev_class": "heater_central", - "location": "a57efe5f145f498c9be62a9b63626fbf", - "maximum_boiler_temperature": { - "lower_bound": 0.0, - "resolution": 1.0, - "setpoint": 60.0, - "upper_bound": 100.0 - }, - "model": "Generic heater/cooler", - "name": "OpenTherm", - "sensors": { - "dhw_temperature": 41.5, - "domestic_hot_water_setpoint": 60.0, - "intended_boiler_temperature": 0.0, - "modulation_level": 100, - "outdoor_air_temperature": 22.0, - "return_temperature": 23.8, - "water_pressure": 1.61, - "water_temperature": 24.7 - }, - "switches": { - "dhw_cm_switch": false - }, - "vendor": "Techneco" - }, - "3cb70739631c4d17a86b8b12e8a5161b": { - "active_preset": "home", - "available_schedules": ["standaard", "off"], - "climate_mode": "heat_cool", - "control_state": "cooling", - "dev_class": "thermostat", - "firmware": "2018-02-08T11:15:53+01:00", - "hardware": "6539-1301-5002", - "location": "c784ee9fdab44e1395b8dee7d7a497d5", - "model": "ThermoTouch", - "name": "Anna", - "preset_modes": ["no_frost", "home", "away", "asleep", "vacation"], - "select_schedule": "off", - "sensors": { - "cooling_activation_outdoor_temperature": 21.0, - "cooling_deactivation_threshold": 6.0, - "illuminance": 24.5, - "setpoint_high": 22.0, - "setpoint_low": 4.0, - "temperature": 22.3 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": -0.5, - "upper_bound": 2.0 - }, - "thermostat": { - "lower_bound": 4.0, - "resolution": 0.1, - "setpoint_high": 22.0, - "setpoint_low": 4.0, - "upper_bound": 30.0 - }, - "vendor": "Plugwise" - } - } -} diff --git a/fixtures/anna_heatpump_heating/all_data.json b/fixtures/anna_heatpump_heating/all_data.json deleted file mode 100644 index 8fc5771b6..000000000 --- a/fixtures/anna_heatpump_heating/all_data.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "devices": { - "015ae9ea3f964e668e490fa39da3870b": { - "binary_sensors": { - "plugwise_notification": false - }, - "dev_class": "gateway", - "firmware": "4.0.15", - "hardware": "AME Smile 2.0 board", - "location": "a57efe5f145f498c9be62a9b63626fbf", - "mac_address": "012345670001", - "model": "Gateway", - "model_id": "smile_thermo", - "name": "Smile Anna", - "notifications": {}, - "sensors": { - "outdoor_temperature": 20.2 - }, - "vendor": "Plugwise" - }, - "1cbf783bb11e4a7c8a6843dee3a86927": { - "available": true, - "binary_sensors": { - "compressor_state": true, - "cooling_enabled": false, - "cooling_state": false, - "dhw_state": false, - "flame_state": false, - "heating_state": true, - "secondary_boiler_state": false - }, - "dev_class": "heater_central", - "location": "a57efe5f145f498c9be62a9b63626fbf", - "max_dhw_temperature": { - "lower_bound": 35.0, - "resolution": 0.01, - "setpoint": 53.0, - "upper_bound": 60.0 - }, - "maximum_boiler_temperature": { - "lower_bound": 0.0, - "resolution": 1.0, - "setpoint": 60.0, - "upper_bound": 100.0 - }, - "model": "Generic heater/cooler", - "name": "OpenTherm", - "sensors": { - "dhw_temperature": 46.3, - "intended_boiler_temperature": 35.0, - "modulation_level": 52, - "outdoor_air_temperature": 3.0, - "return_temperature": 25.1, - "water_pressure": 1.57, - "water_temperature": 29.1 - }, - "switches": { - "dhw_cm_switch": false - }, - "vendor": "Techneco" - }, - "3cb70739631c4d17a86b8b12e8a5161b": { - "active_preset": "home", - "available_schedules": ["standaard", "off"], - "climate_mode": "auto", - "control_state": "heating", - "dev_class": "thermostat", - "firmware": "2018-02-08T11:15:53+01:00", - "hardware": "6539-1301-5002", - "location": "c784ee9fdab44e1395b8dee7d7a497d5", - "model": "ThermoTouch", - "name": "Anna", - "preset_modes": ["no_frost", "home", "away", "asleep", "vacation"], - "select_schedule": "standaard", - "sensors": { - "cooling_activation_outdoor_temperature": 21.0, - "cooling_deactivation_threshold": 4.0, - "illuminance": 86.0, - "setpoint_high": 30.0, - "setpoint_low": 20.5, - "temperature": 19.3 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": -0.5, - "upper_bound": 2.0 - }, - "thermostat": { - "lower_bound": 4.0, - "resolution": 0.1, - "setpoint_high": 30.0, - "setpoint_low": 20.5, - "upper_bound": 30.0 - }, - "vendor": "Plugwise" - } - } -} diff --git a/fixtures/anna_loria_cooling_active/all_data.json b/fixtures/anna_loria_cooling_active/all_data.json deleted file mode 100644 index bd46b01b6..000000000 --- a/fixtures/anna_loria_cooling_active/all_data.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "devices": { - "582dfbdace4d4aeb832923ce7d1ddda0": { - "active_preset": "home", - "available_schedules": ["Winter", "Test ", "off"], - "climate_mode": "auto", - "control_state": "cooling", - "dev_class": "thermostat", - "firmware": "2018-02-08T11:15:53+01:00", - "hardware": "6539-1301-5002", - "location": "15da035090b847e7a21f93e08c015ebc", - "model": "ThermoTouch", - "name": "Anna", - "preset_modes": ["away", "vacation", "no_frost", "home", "asleep"], - "select_schedule": "Winter", - "sensors": { - "illuminance": 45.0, - "setpoint_high": 23.5, - "setpoint_low": 4.0, - "temperature": 24.1 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "thermostat": { - "lower_bound": 4.0, - "resolution": 0.1, - "setpoint_high": 23.5, - "setpoint_low": 4.0, - "upper_bound": 30.0 - }, - "vendor": "Plugwise" - }, - "9ff0569b4984459fb243af64c0901894": { - "binary_sensors": { - "plugwise_notification": false - }, - "dev_class": "gateway", - "firmware": "4.3.8", - "hardware": "AME Smile 2.0 board", - "location": "674b657c138a41a291d315d7471deb06", - "mac_address": "C493000278E2", - "model": "Gateway", - "model_id": "smile_thermo", - "name": "Smile Anna", - "notifications": {}, - "sensors": { - "outdoor_temperature": 15.5 - }, - "vendor": "Plugwise" - }, - "bfb5ee0a88e14e5f97bfa725a760cc49": { - "available": true, - "binary_sensors": { - "cooling_enabled": true, - "cooling_state": true, - "dhw_state": false, - "flame_state": false, - "heating_state": false - }, - "dev_class": "heater_central", - "dhw_modes": ["off", "auto", "boost", "eco", "comfort"], - "location": "674b657c138a41a291d315d7471deb06", - "max_dhw_temperature": { - "lower_bound": 35.0, - "resolution": 0.01, - "setpoint": 53.0, - "upper_bound": 60.0 - }, - "maximum_boiler_temperature": { - "lower_bound": 25.0, - "resolution": 0.01, - "setpoint": 40.0, - "upper_bound": 45.0 - }, - "model": "Generic heater/cooler", - "model_id": "173", - "name": "OpenTherm", - "select_dhw_mode": "auto", - "sensors": { - "dhw_temperature": 52.9, - "intended_boiler_temperature": 0.0, - "modulation_level": 100, - "outdoor_air_temperature": 17.2, - "return_temperature": 26.3, - "water_temperature": 25.3 - }, - "switches": { - "cooling_ena_switch": true, - "dhw_cm_switch": true - }, - "vendor": "Atlantic" - } - } -} diff --git a/fixtures/anna_loria_driessens/all_data.json b/fixtures/anna_loria_driessens/all_data.json deleted file mode 100644 index 54f6d0fb7..000000000 --- a/fixtures/anna_loria_driessens/all_data.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "devices": { - "5c118b1842e943c0a5b6ef88a60bb17a": { - "binary_sensors": { - "plugwise_notification": false - }, - "dev_class": "gateway", - "firmware": "4.4.1", - "hardware": "AME Smile 2.0 board", - "location": "82c15f65c9bf44c592d69e16139355e3", - "mac_address": "D40FB2011556", - "model": "Gateway", - "model_id": "smile_thermo", - "name": "Smile Anna", - "notifications": {}, - "sensors": { - "outdoor_temperature": 6.81 - }, - "vendor": "Plugwise" - }, - "9fb768d699e44c7fb5cc50309dc4e7d4": { - "active_preset": "home", - "available_schedules": [ - "Verwarmen@9-23u", - "VAKANTIE (winter)", - "VERWARMEN", - "KOELEN", - "off" - ], - "climate_mode": "auto", - "control_state": "idle", - "dev_class": "thermostat", - "firmware": "2018-02-08T11:15:53+01:00", - "hardware": "6539-1301-5002", - "location": "fa70e08550c94de3a34feb27ecf31421", - "model": "ThermoTouch", - "name": "Anna", - "preset_modes": ["no_frost", "asleep", "vacation", "away", "home"], - "select_schedule": "Verwarmen@9-23u", - "sensors": { - "illuminance": 5.5, - "setpoint_high": 30.0, - "setpoint_low": 20.0, - "temperature": 21.2 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "thermostat": { - "lower_bound": 4.0, - "resolution": 0.1, - "setpoint_high": 30.0, - "setpoint_low": 20.0, - "upper_bound": 30.0 - }, - "vendor": "Plugwise" - }, - "a449cbc334ae4a5bb7f89064984b2906": { - "available": true, - "binary_sensors": { - "cooling_enabled": false, - "cooling_state": false, - "dhw_state": false, - "flame_state": false, - "heating_state": false - }, - "dev_class": "heater_central", - "dhw_modes": ["comfort", "eco", "off", "boost", "auto"], - "location": "82c15f65c9bf44c592d69e16139355e3", - "max_dhw_temperature": { - "lower_bound": 35.0, - "resolution": 0.01, - "setpoint": 53.0, - "upper_bound": 60.0 - }, - "maximum_boiler_temperature": { - "lower_bound": 25.0, - "resolution": 0.01, - "setpoint": 45.0, - "upper_bound": 45.0 - }, - "model": "Generic heater/cooler", - "model_id": "173", - "name": "OpenTherm", - "select_dhw_mode": "auto", - "sensors": { - "dhw_temperature": 49.5, - "intended_boiler_temperature": 0.0, - "modulation_level": 0.0, - "outdoor_air_temperature": 7.5, - "return_temperature": 23.0, - "water_temperature": 23.3 - }, - "switches": { - "cooling_ena_switch": false, - "dhw_cm_switch": true - }, - "vendor": "Atlantic" - } - } -} diff --git a/fixtures/anna_loria_heating_idle/all_data.json b/fixtures/anna_loria_heating_idle/all_data.json deleted file mode 100644 index 8eaee922f..000000000 --- a/fixtures/anna_loria_heating_idle/all_data.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "devices": { - "582dfbdace4d4aeb832923ce7d1ddda0": { - "active_preset": "home", - "available_schedules": ["Winter", "Test ", "off"], - "climate_mode": "auto", - "control_state": "idle", - "dev_class": "thermostat", - "firmware": "2018-02-08T11:15:53+01:00", - "hardware": "6539-1301-5002", - "location": "15da035090b847e7a21f93e08c015ebc", - "model": "ThermoTouch", - "name": "Anna", - "preset_modes": ["away", "vacation", "no_frost", "home", "asleep"], - "select_schedule": "Winter", - "sensors": { - "illuminance": 45.0, - "setpoint_high": 30.0, - "setpoint_low": 20.5, - "temperature": 22.1 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "thermostat": { - "lower_bound": 4.0, - "resolution": 0.1, - "setpoint_high": 30.0, - "setpoint_low": 20.5, - "upper_bound": 30.0 - }, - "vendor": "Plugwise" - }, - "9ff0569b4984459fb243af64c0901894": { - "binary_sensors": { - "plugwise_notification": false - }, - "dev_class": "gateway", - "firmware": "4.3.8", - "hardware": "AME Smile 2.0 board", - "location": "674b657c138a41a291d315d7471deb06", - "mac_address": "C493000278E2", - "model": "Gateway", - "model_id": "smile_thermo", - "name": "Smile Anna", - "notifications": {}, - "sensors": { - "outdoor_temperature": 15.5 - }, - "vendor": "Plugwise" - }, - "bfb5ee0a88e14e5f97bfa725a760cc49": { - "available": true, - "binary_sensors": { - "cooling_enabled": false, - "cooling_state": false, - "dhw_state": false, - "flame_state": false, - "heating_state": false - }, - "dev_class": "heater_central", - "dhw_modes": ["off", "auto", "boost", "eco", "comfort"], - "location": "674b657c138a41a291d315d7471deb06", - "max_dhw_temperature": { - "lower_bound": 35.0, - "resolution": 0.01, - "setpoint": 53.0, - "upper_bound": 60.0 - }, - "maximum_boiler_temperature": { - "lower_bound": 25.0, - "resolution": 0.01, - "setpoint": 40.0, - "upper_bound": 45.0 - }, - "model": "Generic heater/cooler", - "model_id": "173", - "name": "OpenTherm", - "select_dhw_mode": "auto", - "sensors": { - "dhw_temperature": 52.9, - "intended_boiler_temperature": 0.0, - "modulation_level": 0.0, - "outdoor_air_temperature": 17.2, - "return_temperature": 26.3, - "water_temperature": 25.3 - }, - "switches": { - "cooling_ena_switch": false, - "dhw_cm_switch": true - }, - "vendor": "Atlantic" - } - } -} diff --git a/fixtures/anna_v4/all_data.json b/fixtures/anna_v4/all_data.json deleted file mode 100644 index 8cd59b72e..000000000 --- a/fixtures/anna_v4/all_data.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "devices": { - "01b85360fdd243d0aaad4d6ac2a5ba7e": { - "active_preset": "home", - "available_schedules": ["Standaard", "Thuiswerken", "off"], - "climate_mode": "heat", - "control_state": "heating", - "dev_class": "thermostat", - "firmware": "2018-02-08T11:15:53+01:00", - "hardware": "6539-1301-5002", - "location": "eb5309212bf5407bb143e5bfa3b18aee", - "model": "ThermoTouch", - "name": "Anna", - "preset_modes": ["vacation", "no_frost", "away", "asleep", "home"], - "select_schedule": "off", - "sensors": { - "illuminance": 60.0, - "setpoint": 20.5, - "temperature": 20.6 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "thermostat": { - "lower_bound": 4.0, - "resolution": 0.1, - "setpoint": 20.5, - "upper_bound": 30.0 - }, - "vendor": "Plugwise" - }, - "0466eae8520144c78afb29628384edeb": { - "binary_sensors": { - "plugwise_notification": false - }, - "dev_class": "gateway", - "firmware": "4.0.15", - "hardware": "AME Smile 2.0 board", - "location": "94c107dc6ac84ed98e9f68c0dd06bf71", - "mac_address": "012345670001", - "model": "Gateway", - "model_id": "smile_thermo", - "name": "Smile Anna", - "notifications": {}, - "sensors": { - "outdoor_temperature": 7.44 - }, - "vendor": "Plugwise" - }, - "cd0e6156b1f04d5f952349ffbe397481": { - "available": true, - "binary_sensors": { - "dhw_state": false, - "flame_state": false, - "heating_state": true - }, - "dev_class": "heater_central", - "location": "94c107dc6ac84ed98e9f68c0dd06bf71", - "max_dhw_temperature": { - "lower_bound": 30.0, - "resolution": 0.01, - "setpoint": 60.0, - "upper_bound": 60.0 - }, - "maximum_boiler_temperature": { - "lower_bound": 0.0, - "resolution": 1.0, - "setpoint": 70.0, - "upper_bound": 100.0 - }, - "model": "Generic heater", - "model_id": "2.32", - "name": "OpenTherm", - "sensors": { - "intended_boiler_temperature": 39.9, - "modulation_level": 0.0, - "return_temperature": 32.0, - "water_pressure": 2.2, - "water_temperature": 45.0 - }, - "switches": { - "dhw_cm_switch": false - }, - "vendor": "Bosch Thermotechniek B.V." - } - } -} diff --git a/fixtures/anna_v4_dhw/all_data.json b/fixtures/anna_v4_dhw/all_data.json deleted file mode 100644 index 08488701c..000000000 --- a/fixtures/anna_v4_dhw/all_data.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "devices": { - "01b85360fdd243d0aaad4d6ac2a5ba7e": { - "active_preset": "home", - "available_schedules": ["Standaard", "Thuiswerken", "off"], - "climate_mode": "heat", - "control_state": "idle", - "dev_class": "thermostat", - "firmware": "2018-02-08T11:15:53+01:00", - "hardware": "6539-1301-5002", - "location": "eb5309212bf5407bb143e5bfa3b18aee", - "model": "ThermoTouch", - "name": "Anna", - "preset_modes": ["vacation", "no_frost", "away", "asleep", "home"], - "select_schedule": "off", - "sensors": { - "illuminance": 60.0, - "setpoint": 20.5, - "temperature": 20.6 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "thermostat": { - "lower_bound": 4.0, - "resolution": 0.1, - "setpoint": 20.5, - "upper_bound": 30.0 - }, - "vendor": "Plugwise" - }, - "0466eae8520144c78afb29628384edeb": { - "binary_sensors": { - "plugwise_notification": false - }, - "dev_class": "gateway", - "firmware": "4.0.15", - "hardware": "AME Smile 2.0 board", - "location": "94c107dc6ac84ed98e9f68c0dd06bf71", - "mac_address": "012345670001", - "model": "Gateway", - "model_id": "smile_thermo", - "name": "Smile Anna", - "notifications": {}, - "sensors": { - "outdoor_temperature": 7.44 - }, - "vendor": "Plugwise" - }, - "cd0e6156b1f04d5f952349ffbe397481": { - "available": true, - "binary_sensors": { - "dhw_state": true, - "flame_state": true, - "heating_state": false - }, - "dev_class": "heater_central", - "location": "94c107dc6ac84ed98e9f68c0dd06bf71", - "max_dhw_temperature": { - "lower_bound": 30.0, - "resolution": 0.01, - "setpoint": 60.0, - "upper_bound": 60.0 - }, - "maximum_boiler_temperature": { - "lower_bound": 0.0, - "resolution": 1.0, - "setpoint": 70.0, - "upper_bound": 100.0 - }, - "model": "Generic heater", - "model_id": "2.32", - "name": "OpenTherm", - "sensors": { - "intended_boiler_temperature": 39.9, - "modulation_level": 0.0, - "return_temperature": 32.0, - "water_pressure": 2.2, - "water_temperature": 45.0 - }, - "switches": { - "dhw_cm_switch": false - }, - "vendor": "Bosch Thermotechniek B.V." - } - } -} diff --git a/fixtures/anna_v4_no_tag/all_data.json b/fixtures/anna_v4_no_tag/all_data.json deleted file mode 100644 index 7a4a80705..000000000 --- a/fixtures/anna_v4_no_tag/all_data.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "devices": { - "01b85360fdd243d0aaad4d6ac2a5ba7e": { - "active_preset": "home", - "available_schedules": ["Standaard", "Thuiswerken", "off"], - "climate_mode": "auto", - "control_state": "heating", - "dev_class": "thermostat", - "firmware": "2018-02-08T11:15:53+01:00", - "hardware": "6539-1301-5002", - "location": "eb5309212bf5407bb143e5bfa3b18aee", - "model": "ThermoTouch", - "name": "Anna", - "preset_modes": ["vacation", "no_frost", "away", "asleep", "home"], - "select_schedule": "Thuiswerken", - "sensors": { - "illuminance": 60.0, - "setpoint": 20.5, - "temperature": 20.6 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "thermostat": { - "lower_bound": 4.0, - "resolution": 0.1, - "setpoint": 20.5, - "upper_bound": 30.0 - }, - "vendor": "Plugwise" - }, - "0466eae8520144c78afb29628384edeb": { - "binary_sensors": { - "plugwise_notification": false - }, - "dev_class": "gateway", - "firmware": "4.0.15", - "hardware": "AME Smile 2.0 board", - "location": "94c107dc6ac84ed98e9f68c0dd06bf71", - "mac_address": "012345670001", - "model": "Gateway", - "model_id": "smile_thermo", - "name": "Smile Anna", - "notifications": {}, - "sensors": { - "outdoor_temperature": 7.44 - }, - "vendor": "Plugwise" - }, - "cd0e6156b1f04d5f952349ffbe397481": { - "available": true, - "binary_sensors": { - "dhw_state": false, - "flame_state": false, - "heating_state": true - }, - "dev_class": "heater_central", - "location": "94c107dc6ac84ed98e9f68c0dd06bf71", - "max_dhw_temperature": { - "lower_bound": 30.0, - "resolution": 0.01, - "setpoint": 60.0, - "upper_bound": 60.0 - }, - "maximum_boiler_temperature": { - "lower_bound": 0.0, - "resolution": 1.0, - "setpoint": 70.0, - "upper_bound": 100.0 - }, - "model": "Generic heater", - "model_id": "2.32", - "name": "OpenTherm", - "sensors": { - "intended_boiler_temperature": 39.9, - "modulation_level": 0.0, - "return_temperature": 32.0, - "water_pressure": 2.2, - "water_temperature": 45.0 - }, - "switches": { - "dhw_cm_switch": false - }, - "vendor": "Bosch Thermotechniek B.V." - } - } -} diff --git a/fixtures/anna_without_boiler_fw441/all_data.json b/fixtures/anna_without_boiler_fw441/all_data.json deleted file mode 100644 index 89d3dc41e..000000000 --- a/fixtures/anna_without_boiler_fw441/all_data.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "devices": { - "7ffbb3ab4b6c4ab2915d7510f7bf8fe9": { - "active_preset": "home", - "available_schedules": ["Test", "Normaal", "off"], - "climate_mode": "auto", - "control_state": "idle", - "dev_class": "thermostat", - "firmware": "2018-02-08T11:15:53+01:00", - "hardware": "6539-1301-5002", - "location": "c34c6864216446528e95d88985e714cc", - "model": "ThermoTouch", - "name": "Anna", - "preset_modes": ["no_frost", "asleep", "away", "vacation", "home"], - "select_schedule": "Normaal", - "sensors": { - "illuminance": 0.25, - "setpoint": 19.0, - "temperature": 19.1 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "thermostat": { - "lower_bound": 4.0, - "resolution": 0.1, - "setpoint": 19.0, - "upper_bound": 30.0 - }, - "vendor": "Plugwise" - }, - "a270735e4ccd45239424badc0578a2b1": { - "binary_sensors": { - "plugwise_notification": false - }, - "dev_class": "gateway", - "firmware": "4.4.1", - "hardware": "AME Smile 2.0 board", - "location": "0f4f2ada20734a339fe353348fe87b96", - "mac_address": "D40FB200FA1C", - "model": "Gateway", - "model_id": "smile_thermo", - "name": "Smile Anna", - "notifications": {}, - "sensors": { - "outdoor_temperature": 8.31 - }, - "vendor": "Plugwise" - }, - "c46b4794d28149699eacf053deedd003": { - "binary_sensors": { - "heating_state": false - }, - "dev_class": "heater_central", - "location": "0f4f2ada20734a339fe353348fe87b96", - "model": "Unknown", - "name": "OnOff" - } - } -} diff --git a/fixtures/legacy_anna/all_data.json b/fixtures/legacy_anna/all_data.json deleted file mode 100644 index b8162f896..000000000 --- a/fixtures/legacy_anna/all_data.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "devices": { - "0000aaaa0000aaaa0000aaaa0000aa00": { - "dev_class": "gateway", - "firmware": "1.8.22", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "mac_address": "01:23:45:67:89:AB", - "model": "Gateway", - "name": "Smile Anna", - "vendor": "Plugwise" - }, - "04e4cbfe7f4340f090f85ec3b9e6a950": { - "binary_sensors": { - "flame_state": true, - "heating_state": true - }, - "dev_class": "heater_central", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "maximum_boiler_temperature": { - "lower_bound": 50.0, - "resolution": 1.0, - "setpoint": 50.0, - "upper_bound": 90.0 - }, - "model": "Generic heater", - "name": "OpenTherm", - "sensors": { - "dhw_temperature": 51.2, - "intended_boiler_temperature": 17.0, - "modulation_level": 0.0, - "return_temperature": 21.7, - "water_pressure": 1.2, - "water_temperature": 23.6 - }, - "vendor": "Bosch Thermotechniek B.V." - }, - "0d266432d64443e283b5d708ae98b455": { - "active_preset": "home", - "climate_mode": "heat", - "control_state": "heating", - "dev_class": "thermostat", - "firmware": "2017-03-13T11:54:58+01:00", - "hardware": "6539-1301-500", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "ThermoTouch", - "name": "Anna", - "preset_modes": ["away", "vacation", "asleep", "home", "no_frost"], - "sensors": { - "illuminance": 150.8, - "setpoint": 20.5, - "temperature": 20.4 - }, - "thermostat": { - "lower_bound": 4.0, - "resolution": 0.1, - "setpoint": 20.5, - "upper_bound": 30.0 - }, - "vendor": "Plugwise" - } - } -} diff --git a/fixtures/legacy_anna_2/all_data.json b/fixtures/legacy_anna_2/all_data.json deleted file mode 100644 index 0b60d7b4a..000000000 --- a/fixtures/legacy_anna_2/all_data.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "devices": { - "9e7377867dc24e51b8098a5ba02bd89d": { - "active_preset": null, - "available_schedules": ["Thermostat schedule", "off"], - "climate_mode": "heat", - "control_state": "idle", - "dev_class": "thermostat", - "firmware": "2017-03-13T11:54:58+01:00", - "hardware": "6539-1301-5002", - "location": "be81e3f8275b4129852c4d8d550ae2eb", - "model": "ThermoTouch", - "name": "Anna", - "preset_modes": ["vacation", "away", "no_frost", "home", "asleep"], - "select_schedule": "off", - "sensors": { - "illuminance": 19.5, - "setpoint": 15.0, - "temperature": 21.4 - }, - "thermostat": { - "lower_bound": 4.0, - "resolution": 0.1, - "setpoint": 15.0, - "upper_bound": 30.0 - }, - "vendor": "Plugwise" - }, - "be81e3f8275b4129852c4d8d550ae2eb": { - "dev_class": "gateway", - "firmware": "1.8.22", - "location": "be81e3f8275b4129852c4d8d550ae2eb", - "mac_address": "01:23:45:67:89:AB", - "model": "Gateway", - "name": "Smile Anna", - "sensors": { - "outdoor_temperature": 21.0 - }, - "vendor": "Plugwise" - }, - "ea5d8a7177e541b0a4b52da815166de4": { - "binary_sensors": { - "flame_state": false, - "heating_state": false - }, - "dev_class": "heater_central", - "location": "be81e3f8275b4129852c4d8d550ae2eb", - "maximum_boiler_temperature": { - "lower_bound": 50.0, - "resolution": 1.0, - "setpoint": 70.0, - "upper_bound": 90.0 - }, - "model": "Generic heater", - "name": "OpenTherm", - "sensors": { - "dhw_temperature": 0.0, - "intended_boiler_temperature": 0.0, - "modulation_level": 0.0, - "return_temperature": 0.0, - "water_pressure": 1.7, - "water_temperature": 54.0 - } - } - } -} diff --git a/fixtures/m_adam_cooling/all_data.json b/fixtures/m_adam_cooling/all_data.json deleted file mode 100644 index ad44fce98..000000000 --- a/fixtures/m_adam_cooling/all_data.json +++ /dev/null @@ -1,205 +0,0 @@ -{ - "devices": { - "056ee145a816487eaa69243c3280f8bf": { - "available": true, - "binary_sensors": { - "cooling_state": true, - "dhw_state": false, - "flame_state": false, - "heating_state": false - }, - "dev_class": "heater_central", - "location": "bc93488efab249e5bc54fd7e175a6f91", - "maximum_boiler_temperature": { - "lower_bound": 25.0, - "resolution": 0.01, - "setpoint": 50.0, - "upper_bound": 95.0 - }, - "model": "Generic heater", - "name": "OpenTherm", - "sensors": { - "intended_boiler_temperature": 17.5, - "water_temperature": 19.0 - }, - "switches": { - "dhw_cm_switch": false - } - }, - "1772a4ea304041adb83f357b751341ff": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2020-11-04T01:00:00+01:00", - "hardware": "1", - "location": "f871b8c4d63549319221e294e4f88074", - "model": "Tom/Floor", - "model_id": "106-03", - "name": "Tom Badkamer", - "sensors": { - "battery": 99, - "setpoint": 18.0, - "temperature": 21.6, - "temperature_difference": -0.2, - "valve_position": 100 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.1, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "000D6F000C8FF5EE" - }, - "ad4838d7d35c4d6ea796ee12ae5aedf8": { - "available": true, - "dev_class": "thermostat", - "location": "f2bf9048bef64cc5b6d5110154e33c81", - "model": "ThermoTouch", - "model_id": "143.1", - "name": "Anna", - "sensors": { - "setpoint": 23.5, - "temperature": 25.8 - }, - "vendor": "Plugwise" - }, - "da224107914542988a88561b4452b0f6": { - "binary_sensors": { - "plugwise_notification": false - }, - "dev_class": "gateway", - "firmware": "3.7.8", - "gateway_modes": ["away", "full", "vacation"], - "hardware": "AME Smile 2.0 board", - "location": "bc93488efab249e5bc54fd7e175a6f91", - "mac_address": "012345679891", - "model": "Gateway", - "model_id": "smile_open_therm", - "name": "Adam", - "notifications": {}, - "regulation_modes": [ - "bleeding_hot", - "bleeding_cold", - "off", - "heating", - "cooling" - ], - "select_gateway_mode": "full", - "select_regulation_mode": "cooling", - "sensors": { - "outdoor_temperature": 29.65 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "000D6F000D5A168D" - }, - "e2f4322d57924fa090fbbc48b3a140dc": { - "available": true, - "binary_sensors": { - "low_battery": true - }, - "dev_class": "zone_thermostat", - "firmware": "2016-10-10T02:00:00+02:00", - "hardware": "255", - "location": "f871b8c4d63549319221e294e4f88074", - "model": "Lisa", - "model_id": "158-01", - "name": "Lisa Badkamer", - "sensors": { - "battery": 14, - "setpoint": 23.5, - "temperature": 23.9 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "000D6F000C869B61" - }, - "e8ef2a01ed3b4139a53bf749204fe6b4": { - "dev_class": "switching", - "members": [ - "2568cc4b9c1e401495d4741a5f89bee1", - "29542b2b6a6a4169acecc15c72a599b8" - ], - "model": "Switchgroup", - "name": "Test", - "switches": { - "relay": true - }, - "vendor": "Plugwise" - }, - "f2bf9048bef64cc5b6d5110154e33c81": { - "active_preset": "home", - "available_schedules": [ - "Badkamer", - "Test", - "Vakantie", - "Weekschema", - "off" - ], - "climate_mode": "cool", - "control_state": "cooling", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Living room", - "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], - "select_schedule": "off", - "sensors": { - "electricity_consumed": 149.9, - "electricity_produced": 0.0, - "temperature": 25.8 - }, - "thermostat": { - "lower_bound": 1.0, - "resolution": 0.01, - "setpoint": 23.5, - "upper_bound": 35.0 - }, - "thermostats": { - "primary": ["ad4838d7d35c4d6ea796ee12ae5aedf8"], - "secondary": [] - }, - "vendor": "Plugwise" - }, - "f871b8c4d63549319221e294e4f88074": { - "active_preset": "home", - "available_schedules": [ - "Badkamer", - "Test", - "Vakantie", - "Weekschema", - "off" - ], - "climate_mode": "auto", - "control_state": "cooling", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Bathroom", - "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], - "select_schedule": "Badkamer", - "sensors": { - "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 23.9 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 25.0, - "upper_bound": 99.9 - }, - "thermostats": { - "primary": ["e2f4322d57924fa090fbbc48b3a140dc"], - "secondary": ["1772a4ea304041adb83f357b751341ff"] - }, - "vendor": "Plugwise" - } - } -} diff --git a/fixtures/m_adam_heating/all_data.json b/fixtures/m_adam_heating/all_data.json deleted file mode 100644 index 27659f013..000000000 --- a/fixtures/m_adam_heating/all_data.json +++ /dev/null @@ -1,204 +0,0 @@ -{ - "devices": { - "056ee145a816487eaa69243c3280f8bf": { - "available": true, - "binary_sensors": { - "dhw_state": false, - "flame_state": false, - "heating_state": true - }, - "dev_class": "heater_central", - "location": "bc93488efab249e5bc54fd7e175a6f91", - "max_dhw_temperature": { - "lower_bound": 40.0, - "resolution": 0.01, - "setpoint": 60.0, - "upper_bound": 60.0 - }, - "maximum_boiler_temperature": { - "lower_bound": 25.0, - "resolution": 0.01, - "setpoint": 50.0, - "upper_bound": 95.0 - }, - "model": "Generic heater", - "name": "OpenTherm", - "sensors": { - "intended_boiler_temperature": 38.1, - "water_temperature": 37.0 - }, - "switches": { - "dhw_cm_switch": false - } - }, - "1772a4ea304041adb83f357b751341ff": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2020-11-04T01:00:00+01:00", - "hardware": "1", - "location": "f871b8c4d63549319221e294e4f88074", - "model": "Tom/Floor", - "model_id": "106-03", - "name": "Tom Badkamer", - "sensors": { - "battery": 99, - "setpoint": 18.0, - "temperature": 18.6, - "temperature_difference": -0.2, - "valve_position": 100 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.1, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "000D6F000C8FF5EE" - }, - "ad4838d7d35c4d6ea796ee12ae5aedf8": { - "available": true, - "dev_class": "thermostat", - "location": "f2bf9048bef64cc5b6d5110154e33c81", - "model": "ThermoTouch", - "model_id": "143.1", - "name": "Anna", - "sensors": { - "setpoint": 20.0, - "temperature": 19.1 - }, - "vendor": "Plugwise" - }, - "da224107914542988a88561b4452b0f6": { - "binary_sensors": { - "plugwise_notification": false - }, - "dev_class": "gateway", - "firmware": "3.7.8", - "gateway_modes": ["away", "full", "vacation"], - "hardware": "AME Smile 2.0 board", - "location": "bc93488efab249e5bc54fd7e175a6f91", - "mac_address": "012345679891", - "model": "Gateway", - "model_id": "smile_open_therm", - "name": "Adam", - "notifications": {}, - "regulation_modes": ["bleeding_hot", "bleeding_cold", "off", "heating"], - "select_gateway_mode": "full", - "select_regulation_mode": "heating", - "sensors": { - "outdoor_temperature": -1.25 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "000D6F000D5A168D" - }, - "e2f4322d57924fa090fbbc48b3a140dc": { - "available": true, - "binary_sensors": { - "low_battery": true - }, - "dev_class": "zone_thermostat", - "firmware": "2016-10-10T02:00:00+02:00", - "hardware": "255", - "location": "f871b8c4d63549319221e294e4f88074", - "model": "Lisa", - "model_id": "158-01", - "name": "Lisa Badkamer", - "sensors": { - "battery": 14, - "setpoint": 15.0, - "temperature": 17.9 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "000D6F000C869B61" - }, - "e8ef2a01ed3b4139a53bf749204fe6b4": { - "dev_class": "switching", - "members": [ - "2568cc4b9c1e401495d4741a5f89bee1", - "29542b2b6a6a4169acecc15c72a599b8" - ], - "model": "Switchgroup", - "name": "Test", - "switches": { - "relay": true - }, - "vendor": "Plugwise" - }, - "f2bf9048bef64cc5b6d5110154e33c81": { - "active_preset": "home", - "available_schedules": [ - "Badkamer", - "Test", - "Vakantie", - "Weekschema", - "off" - ], - "climate_mode": "heat", - "control_state": "preheating", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Living room", - "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], - "select_schedule": "off", - "sensors": { - "electricity_consumed": 149.9, - "electricity_produced": 0.0, - "temperature": 19.1 - }, - "thermostat": { - "lower_bound": 1.0, - "resolution": 0.01, - "setpoint": 20.0, - "upper_bound": 35.0 - }, - "thermostats": { - "primary": ["ad4838d7d35c4d6ea796ee12ae5aedf8"], - "secondary": [] - }, - "vendor": "Plugwise" - }, - "f871b8c4d63549319221e294e4f88074": { - "active_preset": "home", - "available_schedules": [ - "Badkamer", - "Test", - "Vakantie", - "Weekschema", - "off" - ], - "climate_mode": "auto", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Bathroom", - "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"], - "select_schedule": "Badkamer", - "sensors": { - "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 17.9 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 15.0, - "upper_bound": 99.9 - }, - "thermostats": { - "primary": ["e2f4322d57924fa090fbbc48b3a140dc"], - "secondary": ["1772a4ea304041adb83f357b751341ff"] - }, - "vendor": "Plugwise" - } - } -} diff --git a/fixtures/m_adam_jip/all_data.json b/fixtures/m_adam_jip/all_data.json deleted file mode 100644 index 065e07e28..000000000 --- a/fixtures/m_adam_jip/all_data.json +++ /dev/null @@ -1,372 +0,0 @@ -{ - "devices": { - "06aecb3d00354375924f50c47af36bd2": { - "active_preset": "no_frost", - "climate_mode": "off", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Slaapkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "sensors": { - "temperature": 24.2 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 13.0, - "upper_bound": 99.9 - }, - "thermostats": { - "primary": ["1346fbd8498d4dbcab7e18d51b771f3d"], - "secondary": ["356b65335e274d769c338223e7af9c33"] - }, - "vendor": "Plugwise" - }, - "13228dab8ce04617af318a2888b3c548": { - "active_preset": "home", - "climate_mode": "heat", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Woonkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "sensors": { - "temperature": 27.4 - }, - "thermostat": { - "lower_bound": 4.0, - "resolution": 0.01, - "setpoint": 9.0, - "upper_bound": 30.0 - }, - "thermostats": { - "primary": ["f61f1a2535f54f52ad006a3d18e459ca"], - "secondary": ["833de10f269c4deab58fb9df69901b4e"] - }, - "vendor": "Plugwise" - }, - "1346fbd8498d4dbcab7e18d51b771f3d": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "zone_thermostat", - "firmware": "2016-10-27T02:00:00+02:00", - "hardware": "255", - "location": "06aecb3d00354375924f50c47af36bd2", - "model": "Lisa", - "model_id": "158-01", - "name": "Slaapkamer", - "sensors": { - "battery": 92, - "setpoint": 13.0, - "temperature": 24.2 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A03" - }, - "1da4d325838e4ad8aac12177214505c9": { - "available": true, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2020-11-04T01:00:00+01:00", - "hardware": "1", - "location": "d58fec52899f4f1c92e4f8fad6d8c48c", - "model": "Tom/Floor", - "model_id": "106-03", - "name": "Tom Logeerkamer", - "sensors": { - "setpoint": 13.0, - "temperature": 28.8, - "temperature_difference": 2.0, - "valve_position": 0.0 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.1, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A07" - }, - "356b65335e274d769c338223e7af9c33": { - "available": true, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2020-11-04T01:00:00+01:00", - "hardware": "1", - "location": "06aecb3d00354375924f50c47af36bd2", - "model": "Tom/Floor", - "model_id": "106-03", - "name": "Tom Slaapkamer", - "sensors": { - "setpoint": 13.0, - "temperature": 24.2, - "temperature_difference": 1.7, - "valve_position": 0.0 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.1, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A05" - }, - "457ce8414de24596a2d5e7dbc9c7682f": { - "available": true, - "dev_class": "zz_misc_plug", - "location": "9e4433a9d69f40b3aefd15e74395eaec", - "model": "Aqara Smart Plug", - "model_id": "lumi.plug.maeu01", - "name": "Plug", - "sensors": { - "electricity_consumed_interval": 0.0 - }, - "switches": { - "lock": true, - "relay": false - }, - "vendor": "LUMI", - "zigbee_mac_address": "ABCD012345670A06" - }, - "6f3e9d7084214c21b9dfa46f6eeb8700": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "zone_thermostat", - "firmware": "2016-10-27T02:00:00+02:00", - "hardware": "255", - "location": "d27aede973b54be484f6842d1b2802ad", - "model": "Lisa", - "model_id": "158-01", - "name": "Kinderkamer", - "sensors": { - "battery": 79, - "setpoint": 13.0, - "temperature": 30.0 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A02" - }, - "833de10f269c4deab58fb9df69901b4e": { - "available": true, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2020-11-04T01:00:00+01:00", - "hardware": "1", - "location": "13228dab8ce04617af318a2888b3c548", - "model": "Tom/Floor", - "model_id": "106-03", - "name": "Tom Woonkamer", - "sensors": { - "setpoint": 9.0, - "temperature": 24.0, - "temperature_difference": 1.8, - "valve_position": 100 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.1, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A09" - }, - "a6abc6a129ee499c88a4d420cc413b47": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "zone_thermostat", - "firmware": "2016-10-27T02:00:00+02:00", - "hardware": "255", - "location": "d58fec52899f4f1c92e4f8fad6d8c48c", - "model": "Lisa", - "model_id": "158-01", - "name": "Logeerkamer", - "sensors": { - "battery": 80, - "setpoint": 13.0, - "temperature": 30.0 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A01" - }, - "b5c2386c6f6342669e50fe49dd05b188": { - "binary_sensors": { - "plugwise_notification": false - }, - "dev_class": "gateway", - "firmware": "3.2.8", - "gateway_modes": ["away", "full", "vacation"], - "hardware": "AME Smile 2.0 board", - "location": "9e4433a9d69f40b3aefd15e74395eaec", - "mac_address": "012345670001", - "model": "Gateway", - "model_id": "smile_open_therm", - "name": "Adam", - "notifications": {}, - "regulation_modes": ["heating", "off", "bleeding_cold", "bleeding_hot"], - "select_gateway_mode": "full", - "select_regulation_mode": "heating", - "sensors": { - "outdoor_temperature": 24.9 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670101" - }, - "d27aede973b54be484f6842d1b2802ad": { - "active_preset": "home", - "climate_mode": "heat", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Kinderkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "sensors": { - "temperature": 30.0 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 13.0, - "upper_bound": 99.9 - }, - "thermostats": { - "primary": ["6f3e9d7084214c21b9dfa46f6eeb8700"], - "secondary": ["d4496250d0e942cfa7aea3476e9070d5"] - }, - "vendor": "Plugwise" - }, - "d4496250d0e942cfa7aea3476e9070d5": { - "available": true, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2020-11-04T01:00:00+01:00", - "hardware": "1", - "location": "d27aede973b54be484f6842d1b2802ad", - "model": "Tom/Floor", - "model_id": "106-03", - "name": "Tom Kinderkamer", - "sensors": { - "setpoint": 13.0, - "temperature": 28.7, - "temperature_difference": 1.9, - "valve_position": 0.0 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.1, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A04" - }, - "d58fec52899f4f1c92e4f8fad6d8c48c": { - "active_preset": "home", - "climate_mode": "heat", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Logeerkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "sensors": { - "temperature": 30.0 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 13.0, - "upper_bound": 99.9 - }, - "thermostats": { - "primary": ["a6abc6a129ee499c88a4d420cc413b47"], - "secondary": ["1da4d325838e4ad8aac12177214505c9"] - }, - "vendor": "Plugwise" - }, - "e4684553153b44afbef2200885f379dc": { - "available": true, - "binary_sensors": { - "dhw_state": false, - "flame_state": false, - "heating_state": false - }, - "dev_class": "heater_central", - "location": "9e4433a9d69f40b3aefd15e74395eaec", - "max_dhw_temperature": { - "lower_bound": 40.0, - "resolution": 0.01, - "setpoint": 60.0, - "upper_bound": 60.0 - }, - "maximum_boiler_temperature": { - "lower_bound": 20.0, - "resolution": 0.01, - "setpoint": 90.0, - "upper_bound": 90.0 - }, - "model": "Generic heater", - "model_id": "10.20", - "name": "OpenTherm", - "sensors": { - "intended_boiler_temperature": 0.0, - "modulation_level": 0.0, - "return_temperature": 37.1, - "water_pressure": 1.4, - "water_temperature": 37.3 - }, - "switches": { - "dhw_cm_switch": false - }, - "vendor": "Remeha B.V." - }, - "f61f1a2535f54f52ad006a3d18e459ca": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "zone_thermometer", - "firmware": "2020-09-01T02:00:00+02:00", - "hardware": "1", - "location": "13228dab8ce04617af318a2888b3c548", - "model": "Jip", - "model_id": "168-01", - "name": "Woonkamer", - "sensors": { - "battery": 100, - "humidity": 56.2, - "setpoint": 9.0, - "temperature": 27.4 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": 0.0, - "upper_bound": 2.0 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A08" - } - } -} diff --git a/fixtures/m_adam_multiple_devices_per_zone/all_data.json b/fixtures/m_adam_multiple_devices_per_zone/all_data.json deleted file mode 100644 index 08788aa1c..000000000 --- a/fixtures/m_adam_multiple_devices_per_zone/all_data.json +++ /dev/null @@ -1,586 +0,0 @@ -{ - "devices": { - "02cf28bfec924855854c544690a609ef": { - "available": true, - "dev_class": "vcr_plug", - "firmware": "2019-06-21T02:00:00+02:00", - "location": "cd143c07248f491493cea0533bc3d669", - "model": "Plug", - "model_id": "160-01", - "name": "NVR", - "sensors": { - "electricity_consumed": 34.0, - "electricity_consumed_interval": 9.15, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": true, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A15" - }, - "08963fec7c53423ca5680aa4cb502c63": { - "active_preset": "away", - "available_schedules": [ - "CV Roan", - "Bios Schema met Film Avond", - "GF7 Woonkamer", - "Badkamer Schema", - "CV Jessie", - "off" - ], - "climate_mode": "auto", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Badkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "select_schedule": "Badkamer Schema", - "sensors": { - "temperature": 18.9 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 14.0, - "upper_bound": 100.0 - }, - "thermostats": { - "primary": [ - "f1fee6043d3642a9b0a65297455f008e", - "680423ff840043738f42cc7f1ff97a36" - ], - "secondary": [] - }, - "vendor": "Plugwise" - }, - "12493538af164a409c6a1c79e38afe1c": { - "active_preset": "away", - "available_schedules": [ - "CV Roan", - "Bios Schema met Film Avond", - "GF7 Woonkamer", - "Badkamer Schema", - "CV Jessie", - "off" - ], - "climate_mode": "heat", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Bios", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "select_schedule": "off", - "sensors": { - "electricity_consumed": 0.0, - "electricity_produced": 0.0, - "temperature": 16.5 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 13.0, - "upper_bound": 100.0 - }, - "thermostats": { - "primary": ["df4a4a8169904cdb9c03d61a21f42140"], - "secondary": ["a2c3583e0a6349358998b760cea82d2a"] - }, - "vendor": "Plugwise" - }, - "21f2b542c49845e6bb416884c55778d6": { - "available": true, - "dev_class": "game_console_plug", - "firmware": "2019-06-21T02:00:00+02:00", - "location": "cd143c07248f491493cea0533bc3d669", - "model": "Plug", - "model_id": "160-01", - "name": "Playstation Smart Plug", - "sensors": { - "electricity_consumed": 84.1, - "electricity_consumed_interval": 8.6, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A12" - }, - "446ac08dd04d4eff8ac57489757b7314": { - "active_preset": "no_frost", - "climate_mode": "heat", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Garage", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "sensors": { - "temperature": 15.6 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 5.5, - "upper_bound": 100.0 - }, - "thermostats": { - "primary": ["e7693eb9582644e5b865dba8d4447cf1"], - "secondary": [] - }, - "vendor": "Plugwise" - }, - "4a810418d5394b3f82727340b91ba740": { - "available": true, - "dev_class": "router_plug", - "firmware": "2019-06-21T02:00:00+02:00", - "location": "cd143c07248f491493cea0533bc3d669", - "model": "Plug", - "model_id": "160-01", - "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_plug", - "firmware": "2019-06-21T02:00:00+02:00", - "location": "cd143c07248f491493cea0533bc3d669", - "model": "Plug", - "model_id": "160-01", - "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, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2019-03-27T01:00:00+01:00", - "hardware": "1", - "location": "08963fec7c53423ca5680aa4cb502c63", - "model": "Tom/Floor", - "model_id": "106-03", - "name": "Thermostatic Radiator Badkamer 1", - "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": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "zone_thermostat", - "firmware": "2016-10-27T02:00:00+02:00", - "hardware": "255", - "location": "82fa13f017d240daa0d0ea1775420f24", - "model": "Lisa", - "model_id": "158-01", - "name": "Zone Thermostat 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 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A03" - }, - "78d1126fc4c743db81b61c20e88342a7": { - "available": true, - "dev_class": "central_heating_pump_plug", - "firmware": "2019-06-21T02:00:00+02:00", - "location": "c50f167537524366a5af7aa3942feb1e", - "model": "Plug", - "model_id": "160-01", - "name": "CV Pomp", - "sensors": { - "electricity_consumed": 35.6, - "electricity_consumed_interval": 7.37, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A05" - }, - "82fa13f017d240daa0d0ea1775420f24": { - "active_preset": "asleep", - "available_schedules": [ - "CV Roan", - "Bios Schema met Film Avond", - "GF7 Woonkamer", - "Badkamer Schema", - "CV Jessie", - "off" - ], - "climate_mode": "auto", - "control_state": "idle", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Jessie", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "select_schedule": "CV Jessie", - "sensors": { - "temperature": 17.2 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 15.0, - "upper_bound": 100.0 - }, - "thermostats": { - "primary": ["6a3bf693d05e48e0b460c815a4fdd09d"], - "secondary": ["d3da73bde12a47d5a6b8f9dad971f2ec"] - }, - "vendor": "Plugwise" - }, - "90986d591dcd426cae3ec3e8111ff730": { - "binary_sensors": { - "heating_state": true - }, - "dev_class": "heater_central", - "location": "1f9dcf83fd4e4b66b72ff787957bfe5d", - "model": "Unknown", - "name": "OnOff", - "sensors": { - "intended_boiler_temperature": 70.0, - "modulation_level": 1, - "water_temperature": 70.0 - } - }, - "a28f588dc4a049a483fd03a30361ad3a": { - "available": true, - "dev_class": "settop_plug", - "firmware": "2019-06-21T02:00:00+02:00", - "location": "cd143c07248f491493cea0533bc3d669", - "model": "Plug", - "model_id": "160-01", - "name": "Fibaro HC2", - "sensors": { - "electricity_consumed": 12.5, - "electricity_consumed_interval": 3.8, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": true, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A13" - }, - "a2c3583e0a6349358998b760cea82d2a": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2019-03-27T01:00:00+01:00", - "hardware": "1", - "location": "12493538af164a409c6a1c79e38afe1c", - "model": "Tom/Floor", - "model_id": "106-03", - "name": "Bios Cv Thermostatic Radiator ", - "sensors": { - "battery": 62, - "setpoint": 13.0, - "temperature": 17.2, - "temperature_difference": -0.2, - "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": "ABCD012345670A09" - }, - "b310b72a0e354bfab43089919b9a88bf": { - "available": true, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2019-03-27T01:00:00+01:00", - "hardware": "1", - "location": "c50f167537524366a5af7aa3942feb1e", - "model": "Tom/Floor", - "model_id": "106-03", - "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": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "zone_thermostat", - "firmware": "2016-08-02T02:00:00+02:00", - "hardware": "255", - "location": "c50f167537524366a5af7aa3942feb1e", - "model": "Lisa", - "model_id": "158-01", - "name": "Zone Lisa WK", - "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 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A07" - }, - "c50f167537524366a5af7aa3942feb1e": { - "active_preset": "home", - "available_schedules": [ - "CV Roan", - "Bios Schema met Film Avond", - "GF7 Woonkamer", - "Badkamer Schema", - "CV Jessie", - "off" - ], - "climate_mode": "auto", - "control_state": "heating", - "dev_class": "climate", - "model": "ThermoZone", - "name": "Woonkamer", - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], - "select_schedule": "GF7 Woonkamer", - "sensors": { - "electricity_consumed": 35.6, - "electricity_produced": 0.0, - "temperature": 20.9 - }, - "thermostat": { - "lower_bound": 0.0, - "resolution": 0.01, - "setpoint": 21.5, - "upper_bound": 100.0 - }, - "thermostats": { - "primary": ["b59bcebaf94b499ea7d46e4a66fb62d8"], - "secondary": ["b310b72a0e354bfab43089919b9a88bf"] - }, - "vendor": "Plugwise" - }, - "cd0ddb54ef694e11ac18ed1cbce5dbbd": { - "available": true, - "dev_class": "vcr_plug", - "firmware": "2019-06-21T02:00:00+02:00", - "location": "cd143c07248f491493cea0533bc3d669", - "model": "Plug", - "model_id": "160-01", - "name": "NAS", - "sensors": { - "electricity_consumed": 16.5, - "electricity_consumed_interval": 0.5, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": true, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A14" - }, - "d3da73bde12a47d5a6b8f9dad971f2ec": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2019-03-27T01:00:00+01:00", - "hardware": "1", - "location": "82fa13f017d240daa0d0ea1775420f24", - "model": "Tom/Floor", - "model_id": "106-03", - "name": "Thermostatic Radiator Jessie", - "sensors": { - "battery": 62, - "setpoint": 15.0, - "temperature": 17.1, - "temperature_difference": 0.1, - "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": "ABCD012345670A10" - }, - "df4a4a8169904cdb9c03d61a21f42140": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "zone_thermostat", - "firmware": "2016-10-27T02:00:00+02:00", - "hardware": "255", - "location": "12493538af164a409c6a1c79e38afe1c", - "model": "Lisa", - "model_id": "158-01", - "name": "Zone Lisa Bios", - "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 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A06" - }, - "e7693eb9582644e5b865dba8d4447cf1": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2019-03-27T01:00:00+01:00", - "hardware": "1", - "location": "446ac08dd04d4eff8ac57489757b7314", - "model": "Tom/Floor", - "model_id": "106-03", - "name": "CV Kraan Garage", - "sensors": { - "battery": 68, - "setpoint": 5.5, - "temperature": 15.6, - "temperature_difference": 0.0, - "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": "ABCD012345670A11" - }, - "f1fee6043d3642a9b0a65297455f008e": { - "available": true, - "binary_sensors": { - "low_battery": false - }, - "dev_class": "thermostatic_radiator_valve", - "firmware": "2016-10-27T02:00:00+02:00", - "hardware": "255", - "location": "08963fec7c53423ca5680aa4cb502c63", - "model": "Lisa", - "model_id": "158-01", - "name": "Thermostatic Radiator Badkamer 2", - "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 - }, - "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", - "model_id": "smile_open_therm", - "name": "Adam", - "notifications": { - "af82e4ccf9c548528166d38e560662a4": { - "warning": "Node Plug (with MAC address 000D6F000D13CB01, in room 'n.a.') has been unreachable since 23:03 2020-01-18. Please check the connection and restart the device." - } - }, - "select_regulation_mode": "heating", - "sensors": { - "outdoor_temperature": 7.81 - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670101" - } - } -} diff --git a/fixtures/m_anna_heatpump_cooling/all_data.json b/fixtures/m_anna_heatpump_cooling/all_data.json deleted file mode 100644 index 4f969c2c0..000000000 --- a/fixtures/m_anna_heatpump_cooling/all_data.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "devices": { - "015ae9ea3f964e668e490fa39da3870b": { - "binary_sensors": { - "plugwise_notification": false - }, - "dev_class": "gateway", - "firmware": "4.0.15", - "hardware": "AME Smile 2.0 board", - "location": "a57efe5f145f498c9be62a9b63626fbf", - "mac_address": "012345670001", - "model": "Gateway", - "model_id": "smile_thermo", - "name": "Smile Anna", - "notifications": {}, - "sensors": { - "outdoor_temperature": 28.2 - }, - "vendor": "Plugwise" - }, - "1cbf783bb11e4a7c8a6843dee3a86927": { - "available": true, - "binary_sensors": { - "compressor_state": true, - "cooling_enabled": true, - "cooling_state": true, - "dhw_state": false, - "flame_state": false, - "heating_state": false, - "secondary_boiler_state": false - }, - "dev_class": "heater_central", - "location": "a57efe5f145f498c9be62a9b63626fbf", - "max_dhw_temperature": { - "lower_bound": 35.0, - "resolution": 0.01, - "setpoint": 53.0, - "upper_bound": 60.0 - }, - "maximum_boiler_temperature": { - "lower_bound": 0.0, - "resolution": 1.0, - "setpoint": 60.0, - "upper_bound": 100.0 - }, - "model": "Generic heater/cooler", - "name": "OpenTherm", - "sensors": { - "dhw_temperature": 41.5, - "intended_boiler_temperature": 0.0, - "modulation_level": 40, - "outdoor_air_temperature": 28.0, - "return_temperature": 23.8, - "water_pressure": 1.57, - "water_temperature": 22.7 - }, - "switches": { - "dhw_cm_switch": false - }, - "vendor": "Techneco" - }, - "3cb70739631c4d17a86b8b12e8a5161b": { - "active_preset": "home", - "available_schedules": ["standaard", "off"], - "climate_mode": "auto", - "control_state": "cooling", - "dev_class": "thermostat", - "firmware": "2018-02-08T11:15:53+01:00", - "hardware": "6539-1301-5002", - "location": "c784ee9fdab44e1395b8dee7d7a497d5", - "model": "ThermoTouch", - "name": "Anna", - "preset_modes": ["no_frost", "home", "away", "asleep", "vacation"], - "select_schedule": "standaard", - "sensors": { - "cooling_activation_outdoor_temperature": 21.0, - "cooling_deactivation_threshold": 4.0, - "illuminance": 86.0, - "setpoint_high": 30.0, - "setpoint_low": 20.5, - "temperature": 26.3 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": -0.5, - "upper_bound": 2.0 - }, - "thermostat": { - "lower_bound": 4.0, - "resolution": 0.1, - "setpoint_high": 30.0, - "setpoint_low": 20.5, - "upper_bound": 30.0 - }, - "vendor": "Plugwise" - } - } -} diff --git a/fixtures/m_anna_heatpump_idle/all_data.json b/fixtures/m_anna_heatpump_idle/all_data.json deleted file mode 100644 index 52c12a093..000000000 --- a/fixtures/m_anna_heatpump_idle/all_data.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "devices": { - "015ae9ea3f964e668e490fa39da3870b": { - "binary_sensors": { - "plugwise_notification": false - }, - "dev_class": "gateway", - "firmware": "4.0.15", - "hardware": "AME Smile 2.0 board", - "location": "a57efe5f145f498c9be62a9b63626fbf", - "mac_address": "012345670001", - "model": "Gateway", - "model_id": "smile_thermo", - "name": "Smile Anna", - "notifications": {}, - "sensors": { - "outdoor_temperature": 28.2 - }, - "vendor": "Plugwise" - }, - "1cbf783bb11e4a7c8a6843dee3a86927": { - "available": true, - "binary_sensors": { - "compressor_state": false, - "cooling_enabled": true, - "cooling_state": false, - "dhw_state": false, - "flame_state": false, - "heating_state": false, - "secondary_boiler_state": false - }, - "dev_class": "heater_central", - "location": "a57efe5f145f498c9be62a9b63626fbf", - "max_dhw_temperature": { - "lower_bound": 35.0, - "resolution": 0.01, - "setpoint": 53.0, - "upper_bound": 60.0 - }, - "maximum_boiler_temperature": { - "lower_bound": 0.0, - "resolution": 1.0, - "setpoint": 60.0, - "upper_bound": 100.0 - }, - "model": "Generic heater/cooler", - "name": "OpenTherm", - "sensors": { - "dhw_temperature": 46.3, - "intended_boiler_temperature": 18.0, - "modulation_level": 0, - "outdoor_air_temperature": 28.2, - "return_temperature": 22.0, - "water_pressure": 1.57, - "water_temperature": 19.1 - }, - "switches": { - "dhw_cm_switch": false - }, - "vendor": "Techneco" - }, - "3cb70739631c4d17a86b8b12e8a5161b": { - "active_preset": "home", - "available_schedules": ["standaard", "off"], - "climate_mode": "auto", - "control_state": "idle", - "dev_class": "thermostat", - "firmware": "2018-02-08T11:15:53+01:00", - "hardware": "6539-1301-5002", - "location": "c784ee9fdab44e1395b8dee7d7a497d5", - "model": "ThermoTouch", - "name": "Anna", - "preset_modes": ["no_frost", "home", "away", "asleep", "vacation"], - "select_schedule": "standaard", - "sensors": { - "cooling_activation_outdoor_temperature": 25.0, - "cooling_deactivation_threshold": 4.0, - "illuminance": 86.0, - "setpoint_high": 30.0, - "setpoint_low": 20.5, - "temperature": 23.0 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": -0.5, - "upper_bound": 2.0 - }, - "thermostat": { - "lower_bound": 4.0, - "resolution": 0.1, - "setpoint_high": 30.0, - "setpoint_low": 20.5, - "upper_bound": 30.0 - }, - "vendor": "Plugwise" - } - } -} diff --git a/fixtures/p1v4_442_single/all_data.json b/fixtures/p1v4_442_single/all_data.json deleted file mode 100644 index b98202b42..000000000 --- a/fixtures/p1v4_442_single/all_data.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "devices": { - "a455b61e52394b2db5081ce025a430f3": { - "binary_sensors": { - "plugwise_notification": false - }, - "dev_class": "gateway", - "firmware": "4.4.2", - "hardware": "AME Smile 2.0 board", - "location": "a455b61e52394b2db5081ce025a430f3", - "mac_address": "012345670001", - "model": "Gateway", - "model_id": "smile", - "name": "Smile P1", - "notifications": {}, - "vendor": "Plugwise" - }, - "ba4de7613517478da82dd9b6abea36af": { - "available": true, - "dev_class": "smartmeter", - "location": "a455b61e52394b2db5081ce025a430f3", - "model": "KFM5KAIFA-METER", - "name": "P1", - "sensors": { - "electricity_consumed_off_peak_cumulative": 17643.423, - "electricity_consumed_off_peak_interval": 15, - "electricity_consumed_off_peak_point": 486, - "electricity_consumed_peak_cumulative": 13966.608, - "electricity_consumed_peak_interval": 0, - "electricity_consumed_peak_point": 0, - "electricity_phase_one_consumed": 486, - "electricity_phase_one_produced": 0, - "electricity_produced_off_peak_cumulative": 0.0, - "electricity_produced_off_peak_interval": 0, - "electricity_produced_off_peak_point": 0, - "electricity_produced_peak_cumulative": 0.0, - "electricity_produced_peak_interval": 0, - "electricity_produced_peak_point": 0, - "net_electricity_cumulative": 31610.031, - "net_electricity_point": 486 - }, - "vendor": "SHENZHEN KAIFA TECHNOLOGY \uff08CHENGDU\uff09 CO., LTD." - } - } -} diff --git a/fixtures/p1v4_442_triple/all_data.json b/fixtures/p1v4_442_triple/all_data.json deleted file mode 100644 index 62d4def33..000000000 --- a/fixtures/p1v4_442_triple/all_data.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "devices": { - "03e65b16e4b247a29ae0d75a78cb492e": { - "binary_sensors": { - "plugwise_notification": true - }, - "dev_class": "gateway", - "firmware": "4.4.2", - "hardware": "AME Smile 2.0 board", - "location": "03e65b16e4b247a29ae0d75a78cb492e", - "mac_address": "012345670001", - "model": "Gateway", - "model_id": "smile", - "name": "Smile P1", - "notifications": { - "97a04c0c263049b29350a660b4cdd01e": { - "warning": "The Smile P1 is not connected to a smart meter." - } - }, - "vendor": "Plugwise" - }, - "b82b6b3322484f2ea4e25e0bd5f3d61f": { - "available": true, - "dev_class": "smartmeter", - "location": "03e65b16e4b247a29ae0d75a78cb492e", - "model": "XMX5LGF0010453051839", - "name": "P1", - "sensors": { - "electricity_consumed_off_peak_cumulative": 70537.898, - "electricity_consumed_off_peak_interval": 314, - "electricity_consumed_off_peak_point": 5553, - "electricity_consumed_peak_cumulative": 161328.641, - "electricity_consumed_peak_interval": 0, - "electricity_consumed_peak_point": 0, - "electricity_phase_one_consumed": 1763, - "electricity_phase_one_produced": 0, - "electricity_phase_three_consumed": 2080, - "electricity_phase_three_produced": 0, - "electricity_phase_two_consumed": 1703, - "electricity_phase_two_produced": 0, - "electricity_produced_off_peak_cumulative": 0.0, - "electricity_produced_off_peak_interval": 0, - "electricity_produced_off_peak_point": 0, - "electricity_produced_peak_cumulative": 0.0, - "electricity_produced_peak_interval": 0, - "electricity_produced_peak_point": 0, - "gas_consumed_cumulative": 16811.37, - "gas_consumed_interval": 0.06, - "net_electricity_cumulative": 231866.539, - "net_electricity_point": 5553, - "voltage_phase_one": 233.2, - "voltage_phase_three": 234.7, - "voltage_phase_two": 234.4 - }, - "vendor": "XEMEX NV" - } - } -} diff --git a/fixtures/smile_p1_v2/all_data.json b/fixtures/smile_p1_v2/all_data.json deleted file mode 100644 index bc37c8f01..000000000 --- a/fixtures/smile_p1_v2/all_data.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "devices": { - "938696c4bcdb4b8a9a595cb38ed43913": { - "dev_class": "smartmeter", - "location": "938696c4bcdb4b8a9a595cb38ed43913", - "model": "Ene5\\T210-DESMR5.0", - "name": "P1", - "sensors": { - "electricity_consumed_off_peak_cumulative": 1642.74, - "electricity_consumed_off_peak_interval": 0, - "electricity_consumed_peak_cumulative": 1155.195, - "electricity_consumed_peak_interval": 250, - "electricity_consumed_point": 458, - "electricity_produced_off_peak_cumulative": 482.598, - "electricity_produced_off_peak_interval": 0, - "electricity_produced_peak_cumulative": 1296.136, - "electricity_produced_peak_interval": 0, - "electricity_produced_point": 0, - "gas_consumed_cumulative": 584.433, - "gas_consumed_interval": 0.016, - "net_electricity_cumulative": 1019.201, - "net_electricity_point": 458 - }, - "vendor": "Ene5\\T210-DESMR5.0" - }, - "aaaa0000aaaa0000aaaa0000aaaa00aa": { - "dev_class": "gateway", - "firmware": "2.5.9", - "location": "938696c4bcdb4b8a9a595cb38ed43913", - "mac_address": "012345670001", - "model": "Gateway", - "name": "Smile P1", - "vendor": "Plugwise" - } - } -} diff --git a/fixtures/smile_p1_v2_2/all_data.json b/fixtures/smile_p1_v2_2/all_data.json deleted file mode 100644 index c38f15f81..000000000 --- a/fixtures/smile_p1_v2_2/all_data.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "devices": { - "199aa40f126840f392983d171374ab0b": { - "dev_class": "smartmeter", - "location": "199aa40f126840f392983d171374ab0b", - "model": "Ene5\\T210-DESMR5.0", - "name": "P1", - "sensors": { - "electricity_consumed_off_peak_cumulative": 1642.74, - "electricity_consumed_off_peak_interval": 0, - "electricity_consumed_peak_cumulative": 1155.195, - "electricity_consumed_peak_interval": 250, - "electricity_consumed_point": 458, - "electricity_produced_off_peak_cumulative": 482.598, - "electricity_produced_off_peak_interval": 0, - "electricity_produced_peak_cumulative": 1296.136, - "electricity_produced_peak_interval": 0, - "electricity_produced_point": 0, - "gas_consumed_cumulative": 584.433, - "gas_consumed_interval": 0.016, - "net_electricity_cumulative": 1019.201, - "net_electricity_point": 458 - }, - "vendor": "Ene5\\T210-DESMR5.0" - }, - "aaaa0000aaaa0000aaaa0000aaaa00aa": { - "dev_class": "gateway", - "firmware": "2.5.9", - "location": "199aa40f126840f392983d171374ab0b", - "mac_address": "012345670001", - "model": "Gateway", - "name": "Smile P1", - "vendor": "Plugwise" - } - } -} diff --git a/fixtures/stretch_v23/all_data.json b/fixtures/stretch_v23/all_data.json deleted file mode 100644 index 6b0c67708..000000000 --- a/fixtures/stretch_v23/all_data.json +++ /dev/null @@ -1,356 +0,0 @@ -{ - "devices": { - "0000aaaa0000aaaa0000aaaa0000aa00": { - "dev_class": "gateway", - "firmware": "2.3.12", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "mac_address": "01:23:45:67:89:AB", - "model": "Gateway", - "name": "Stretch", - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670101" - }, - "09c8ce93d7064fa6a233c0e4c2449bfe": { - "dev_class": "lamp", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "0000-0440-0107", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "kerstboom buiten 043B016", - "sensors": { - "electricity_consumed": 0.0, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0 - }, - "switches": { - "lock": false, - "relay": false - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A01" - }, - "199fd4b2caa44197aaf5b3128f6464ed": { - "dev_class": "airconditioner", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "6539-0701-4026", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "Airco 25F69E3", - "sensors": { - "electricity_consumed": 2.06, - "electricity_consumed_interval": 1.62, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A10" - }, - "24b2ed37c8964c73897db6340a39c129": { - "dev_class": "router", - "firmware": "2011-06-27T10:47:37+02:00", - "hardware": "6539-0700-7325", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle+ type F", - "name": "MK Netwerk 1A4455E", - "sensors": { - "electricity_consumed": 4.63, - "electricity_consumed_interval": 0.65, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": true, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "0123456789AB" - }, - "2587a7fcdd7e482dab03fda256076b4b": { - "dev_class": "zz_misc", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "0000-0440-0107", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "00469CA1", - "sensors": { - "electricity_consumed": 0.0, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A16" - }, - "2cc9a0fe70ef4441a9e4f55dfd64b776": { - "dev_class": "lamp", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "6539-0701-4026", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "Lamp TV 025F698F", - "sensors": { - "electricity_consumed": 4.0, - "electricity_consumed_interval": 0.58, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A15" - }, - "305452ce97c243c0a7b4ab2a4ebfe6e3": { - "dev_class": "lamp", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "6539-0701-4026", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "Lamp piano 025F6819", - "sensors": { - "electricity_consumed": 0.0, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": false - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A05" - }, - "33a1c784a9ff4c2d8766a0212714be09": { - "dev_class": "lighting", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "6539-0701-4026", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "Barverlichting", - "sensors": { - "electricity_consumed": 0.0, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": false - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A13" - }, - "407aa1c1099d463c9137a3a9eda787fd": { - "dev_class": "zz_misc", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "0000-0440-0107", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "0043B013", - "sensors": { - "electricity_consumed": 0.0, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0 - }, - "switches": { - "lock": false, - "relay": false - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A09" - }, - "6518f3f72a82486c97b91e26f2e9bd1d": { - "dev_class": "charger", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "6539-0701-4026", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "Bed 025F6768", - "sensors": { - "electricity_consumed": 0.0, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A14" - }, - "713427748874454ca1eb4488d7919cf2": { - "dev_class": "freezer", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "0000-0440-0107", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "Leeg 043220D", - "sensors": { - "electricity_consumed": 0.0, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0 - }, - "switches": { - "lock": false, - "relay": false - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A12" - }, - "71e3e65ffc5a41518b19460c6e8ee34f": { - "dev_class": "tv", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "0000-0440-0107", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "Leeg 043AEC6", - "sensors": { - "electricity_consumed": 0.0, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0 - }, - "switches": { - "lock": false, - "relay": false - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A08" - }, - "828f6ce1e36744689baacdd6ddb1d12c": { - "dev_class": "washingmachine", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "0000-0440-0107", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "Wasmachine 043AEC7", - "sensors": { - "electricity_consumed": 3.5, - "electricity_consumed_interval": 0.5, - "electricity_produced": 0.0 - }, - "switches": { - "lock": true, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A02" - }, - "a28e6f5afc0e4fc68498c1f03e82a052": { - "dev_class": "lamp", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "6539-0701-4026", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "Lamp bank 25F67F8", - "sensors": { - "electricity_consumed": 4.19, - "electricity_consumed_interval": 0.62, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A03" - }, - "bc0adbebc50d428d9444a5d805c89da9": { - "dev_class": "watercooker", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "0000-0440-0107", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "Waterkoker 043AF7F", - "sensors": { - "electricity_consumed": 0.0, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A07" - }, - "c71f1cb2100b42ca942f056dcb7eb01f": { - "dev_class": "tv", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "6539-0701-4026", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "Tv hoek 25F6790", - "sensors": { - "electricity_consumed": 33.3, - "electricity_consumed_interval": 4.93, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A11" - }, - "f7b145c8492f4dd7a4de760456fdef3e": { - "dev_class": "switching", - "members": ["407aa1c1099d463c9137a3a9eda787fd"], - "model": "Switchgroup", - "name": "Test", - "switches": { - "relay": false - }, - "vendor": "Plugwise" - }, - "fd1b74f59e234a9dae4e23b2b5cf07ed": { - "dev_class": "dryer", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "0000-0440-0107", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "Wasdroger 043AECA", - "sensors": { - "electricity_consumed": 1.31, - "electricity_consumed_interval": 0.21, - "electricity_produced": 0.0 - }, - "switches": { - "lock": true, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A04" - }, - "fead900a56d3430bb2d53d891f7c0656": { - "dev_class": "heater_central_plug", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "6539-0701-4026", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "CV-ketel 25F6789", - "sensors": { - "electricity_consumed": 1.56, - "electricity_consumed_interval": 0.04, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": true, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A06" - } - } -} diff --git a/fixtures/stretch_v27_no_domain/all_data.json b/fixtures/stretch_v27_no_domain/all_data.json deleted file mode 100644 index d615ae1d2..000000000 --- a/fixtures/stretch_v27_no_domain/all_data.json +++ /dev/null @@ -1,274 +0,0 @@ -{ - "devices": { - "0000aaaa0000aaaa0000aaaa0000aa00": { - "dev_class": "gateway", - "firmware": "2.7.18", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "mac_address": "01:23:45:67:89:AB", - "model": "Gateway", - "name": "Stretch", - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670101" - }, - "0b078d5862614880bc670cabf9f54b4e": { - "dev_class": "zz_misc", - "firmware": "2011-05-13T09:19:23+02:00", - "hardware": "6539-0701-4023", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "769C03", - "sensors": { - "electricity_consumed": 0.0, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A01" - }, - "3b729c63ca41421b9e21264adfa0a4e7": { - "dev_class": "zz_misc", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "6539-0701-4026", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "261B34C", - "sensors": { - "electricity_consumed": 8.5, - "electricity_consumed_interval": 5.19, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A06" - }, - "4661019bbe7b4a3bbe39f345ca5b5d98": { - "dev_class": "zz_misc", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "6539-0701-4026", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "25F68CC", - "sensors": { - "electricity_consumed": 0.0, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A02" - }, - "553dfa416df94802851de32913f1ebd3": { - "dev_class": "zz_misc", - "firmware": "2011-05-13T09:19:23+02:00", - "hardware": "6539-0701-4023", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "B7DEED", - "sensors": { - "electricity_consumed": 2.5, - "electricity_consumed_interval": 1.66, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A09" - }, - "5ee135e752034ad2a3e38a407332757f": { - "dev_class": "zz_misc", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "6539-0701-4026", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "261B329", - "sensors": { - "electricity_consumed": 6.75, - "electricity_consumed_interval": 3.98, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A03" - }, - "7c7f0d3da801402291b057f9ec69b5b6": { - "dev_class": "zz_misc", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "6539-0701-4026", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "261B34D", - "sensors": { - "electricity_consumed": 7.81, - "electricity_consumed_interval": 4.54, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A08" - }, - "8b8d14b242e24cd789743c828b9a2ea9": { - "dev_class": "zz_misc", - "firmware": "2011-05-13T09:19:23+02:00", - "hardware": "6539-0701-4022", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "76BF93", - "sensors": { - "electricity_consumed": 1.69, - "electricity_consumed_interval": 1.14, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A05" - }, - "8e4ecdcc9094481387e0273437bb51f9": { - "dev_class": "zz_misc", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "6539-0701-4026", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "25F68C3", - "sensors": { - "electricity_consumed": 4.69, - "electricity_consumed_interval": 2.83, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A07" - }, - "9b9bfdb3c7ad4ca5817ccaa235f1e094": { - "dev_class": "zz_misc", - "firmware": "2011-06-27T10:47:37+02:00", - "hardware": "6539-0700-7326", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle+ type F", - "name": "25881A2", - "sensors": { - "electricity_consumed": 13.3, - "electricity_consumed_interval": 7.77, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": true, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A04" - }, - "9db23f92fd114e83acce036b6cb82295": { - "dev_class": "zz_misc", - "firmware": "2011-05-13T09:19:23+02:00", - "hardware": "6539-0701-4023", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "76B2F2", - "sensors": { - "electricity_consumed": 0.63, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A13" - }, - "ad858f416f3e42e6a25bbd6b18178b0e": { - "dev_class": "zz_misc", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "6539-0701-4026", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "261B2AE", - "sensors": { - "electricity_consumed": 6.06, - "electricity_consumed_interval": 3.41, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A12" - }, - "d0122ac66eba47b99d8e5fbd1e2f5932": { - "dev_class": "zz_misc", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "6539-0701-4026", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "25F66AD", - "sensors": { - "electricity_consumed": 3.88, - "electricity_consumed_interval": 2.21, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A10" - }, - "e4172142264f488a99b63c73817c9d21": { - "dev_class": "zz_misc", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "6539-0701-4026", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "261B32A", - "sensors": { - "electricity_consumed": 9.63, - "electricity_consumed_interval": 5.84, - "electricity_produced": 0.0, - "electricity_produced_interval": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A11" - } - } -} diff --git a/fixtures/stretch_v31/all_data.json b/fixtures/stretch_v31/all_data.json deleted file mode 100644 index a4a0b7b1d..000000000 --- a/fixtures/stretch_v31/all_data.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "devices": { - "0000aaaa0000aaaa0000aaaa0000aa00": { - "dev_class": "gateway", - "firmware": "3.1.11", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "mac_address": "01:23:45:67:89:AB", - "model": "Gateway", - "name": "Stretch", - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670101" - }, - "059e4d03c7a34d278add5c7a4a781d19": { - "dev_class": "washingmachine", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "0000-0440-0107", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "Wasmachine (52AC1)", - "sensors": { - "electricity_consumed": 0.0, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0 - }, - "switches": { - "lock": true, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A01" - }, - "5871317346d045bc9f6b987ef25ee638": { - "dev_class": "water_heater_vessel", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "6539-0701-4028", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "Boiler (1EB31)", - "sensors": { - "electricity_consumed": 1.19, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A07" - }, - "aac7b735042c4832ac9ff33aae4f453b": { - "dev_class": "dishwasher", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "6539-0701-4022", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "Vaatwasser (2a1ab)", - "sensors": { - "electricity_consumed": 0.0, - "electricity_consumed_interval": 0.71, - "electricity_produced": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A02" - }, - "cfe95cf3de1948c0b8955125bf754614": { - "dev_class": "dryer", - "firmware": "2011-06-27T10:52:18+02:00", - "hardware": "0000-0440-0107", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle type F", - "name": "Droger (52559)", - "sensors": { - "electricity_consumed": 0.0, - "electricity_consumed_interval": 0.0, - "electricity_produced": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "ABCD012345670A04" - }, - "d03738edfcc947f7b8f4573571d90d2d": { - "dev_class": "switching", - "members": [ - "059e4d03c7a34d278add5c7a4a781d19", - "cfe95cf3de1948c0b8955125bf754614" - ], - "model": "Switchgroup", - "name": "Schakel", - "switches": { - "relay": true - }, - "vendor": "Plugwise" - }, - "d950b314e9d8499f968e6db8d82ef78c": { - "dev_class": "report", - "members": [ - "059e4d03c7a34d278add5c7a4a781d19", - "5871317346d045bc9f6b987ef25ee638", - "aac7b735042c4832ac9ff33aae4f453b", - "cfe95cf3de1948c0b8955125bf754614", - "e1c884e7dede431dadee09506ec4f859" - ], - "model": "Switchgroup", - "name": "Stroomvreters", - "switches": { - "relay": true - }, - "vendor": "Plugwise" - }, - "e1c884e7dede431dadee09506ec4f859": { - "dev_class": "refrigerator", - "firmware": "2011-06-27T10:47:37+02:00", - "hardware": "6539-0700-7330", - "location": "0000aaaa0000aaaa0000aaaa0000aa00", - "model": "Circle+ type F", - "name": "Koelkast (92C4A)", - "sensors": { - "electricity_consumed": 50.5, - "electricity_consumed_interval": 0.08, - "electricity_produced": 0.0 - }, - "switches": { - "lock": false, - "relay": true - }, - "vendor": "Plugwise", - "zigbee_mac_address": "0123456789AB" - } - } -} From 78c2ffc25bd4eb8eeca8ffd55631e54751a7109b Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 25 Jan 2025 13:26:35 +0100 Subject: [PATCH 38/66] Bump to a4 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5d97e9a9a..3d9e30ea1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plugwise" -version = "1.7.0a3" +version = "1.7.0a4" license = {file = "LICENSE"} description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3." readme = "README.md" From 41d8a6d879dbd1464a8f540993267c0b883b602a Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 25 Jan 2025 13:29:50 +0100 Subject: [PATCH 39/66] Update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d91dcf72d..12f392c90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Continuous improvements [#678](https://github.com/plugwise/python-plugwise/pull/678) - Refresh Anna_Elga_2 userdata and adapt, add missing item-count, line-up test-data headers [#679](https://github.com/plugwise/python-plugwise/pull/679) +- Rework code: output a single dict, add gw_data items as Smile-properties [#690](https://github.com/plugwise/python-plugwise/pull/690) ## v1.6.4 From 177d6d6c9514cb1dce7be4f6d95a6b7994024c9d Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 25 Jan 2025 13:46:34 +0100 Subject: [PATCH 40/66] Remove headers from _request(), never provided in the function-call --- plugwise/smilecomm.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/plugwise/smilecomm.py b/plugwise/smilecomm.py index e8f3bea53..f9ec98e1b 100644 --- a/plugwise/smilecomm.py +++ b/plugwise/smilecomm.py @@ -51,36 +51,33 @@ async def _request( retry: int = 3, method: str = "get", data: str | None = None, - headers: dict[str, str] | None = None, ) -> etree: """Get/put/delete data from a give URL.""" resp: ClientResponse url = f"{self._endpoint}{command}" - use_headers = headers - try: match method: case "delete": resp = await self._websession.delete(url, auth=self._auth) case "get": # Work-around for Stretchv2, should not hurt the other smiles - use_headers = {"Accept-Encoding": "gzip"} + headers = {"Accept-Encoding": "gzip"} resp = await self._websession.get( - url, headers=use_headers, auth=self._auth + url, headers=headers, auth=self._auth ) case "post": - use_headers = {"Content-type": "text/xml"} + headers = {"Content-type": "text/xml"} resp = await self._websession.post( url, - headers=use_headers, + headers=headers, data=data, auth=self._auth, ) case "put": - use_headers = {"Content-type": "text/xml"} + headers = {"Content-type": "text/xml"} resp = await self._websession.put( url, - headers=use_headers, + headers=headers, data=data, auth=self._auth, ) From 8d46bb695287a85e735878be44493408a2046833 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 25 Jan 2025 14:06:03 +0100 Subject: [PATCH 41/66] Init _gateway_id in helper.py, take gateway_if from _smile_props Fix --- plugwise/helper.py | 2 +- plugwise/smile.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 7ea6d73f6..1a191a323 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -73,11 +73,11 @@ def __init__(self) -> None: """Set the constructor for this class.""" self._endpoint: str self._elga: bool - self._gateway_id: str self._is_thermostat: bool self._last_active: dict[str, str | None] self._loc_data: dict[str, ThermoLoc] self._schedule_old_states: dict[str, dict[str, str]] + self._gateway_id: str = NONE self.smile_hw_version: str | None self.smile_mac_address: str | None self.smile_model: str diff --git a/plugwise/smile.py b/plugwise/smile.py index d1b23d031..b4af22411 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -131,7 +131,7 @@ async def async_update(self) -> dict[str, GwEntityData]: "cooling_enabled" ] else: # cover failed data-retrieval for P1 - _ = self.gw_entities[self._gateway_id]["location"] + _ = self.gw_entities[self._smile_props["gateway_id"]]["location"] except KeyError as err: raise DataMissingError("No Plugwise actual data received") from err @@ -259,7 +259,7 @@ async def set_gateway_mode(self, mode: str) -> None: vacation_time = time_2 + "T23:00:00.000Z" valid = f"{vacation_time}{end_time}" - uri = f"{APPLIANCES};id={self._gateway_id}/gateway_mode_control" + uri = f"{APPLIANCES};id={self._smile_props['gateway_id']}/gateway_mode_control" data = f"{mode}{valid}" await self.call_request(uri, method="put", data=data) From 4f906eee457df7e2272eac29ce0131a2b08e608a Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 25 Jan 2025 14:16:34 +0100 Subject: [PATCH 42/66] Mark use of http as sensitive --- plugwise/smilecomm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugwise/smilecomm.py b/plugwise/smilecomm.py index f9ec98e1b..124e64a67 100644 --- a/plugwise/smilecomm.py +++ b/plugwise/smilecomm.py @@ -43,7 +43,7 @@ def __init__( host = f"[{host}]" self._auth = BasicAuth(username, password=password) - self._endpoint = f"http://{host}:{str(port)}" + self._endpoint = f"http://{host}:{str(port)}" # Sensitive async def _request( self, From 6c102a7636e0423f0d95d06e106f8d9b1337b919 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 25 Jan 2025 14:18:27 +0100 Subject: [PATCH 43/66] Bump to a5 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3d9e30ea1..f37f00d27 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plugwise" -version = "1.7.0a4" +version = "1.7.0a5" license = {file = "LICENSE"} description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3." readme = "README.md" From 11d2da2575f284fc8da01d4912d0b74be6d080e6 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 25 Jan 2025 14:57:50 +0100 Subject: [PATCH 44/66] Init gw_entities in helper.py --- plugwise/helper.py | 1 + plugwise/smilecomm.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index 1a191a323..c8236ff75 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -78,6 +78,7 @@ def __init__(self) -> None: self._loc_data: dict[str, ThermoLoc] self._schedule_old_states: dict[str, dict[str, str]] self._gateway_id: str = NONE + self.gw_entities: dict[str, GwEntityData] self.smile_hw_version: str | None self.smile_mac_address: str | None self.smile_model: str diff --git a/plugwise/smilecomm.py b/plugwise/smilecomm.py index 124e64a67..0f6b54384 100644 --- a/plugwise/smilecomm.py +++ b/plugwise/smilecomm.py @@ -43,7 +43,7 @@ def __init__( host = f"[{host}]" self._auth = BasicAuth(username, password=password) - self._endpoint = f"http://{host}:{str(port)}" # Sensitive + self._endpoint = f"http://{host}:{str(port)}" # Sensitive async def _request( self, From eeaedaf4724b34efee3fdff60e626274c1abbb35 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 25 Jan 2025 15:00:16 +0100 Subject: [PATCH 45/66] Bump to a6 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f37f00d27..3342c770b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plugwise" -version = "1.7.0a5" +version = "1.7.0a6" license = {file = "LICENSE"} description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3." readme = "README.md" From cb179cfb524a909a5f4ea5c00a767c6bbd1c7fe9 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 25 Jan 2025 15:13:31 +0100 Subject: [PATCH 46/66] Add missing Smile/Legay/Api attributes --- plugwise/legacy/smile.py | 1 + plugwise/smile.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/plugwise/legacy/smile.py b/plugwise/legacy/smile.py index 530068da5..d00a3fb10 100644 --- a/plugwise/legacy/smile.py +++ b/plugwise/legacy/smile.py @@ -52,6 +52,7 @@ def __init__( smile_type: str, smile_version: Version | None, smile_zigbee_mac_address: str | None, + gw_entities: dict[str, GwEntityData] = {}, ) -> None: """Set the constructor for this class.""" self._cooling_present = False diff --git a/plugwise/smile.py b/plugwise/smile.py index b4af22411..dc90560f6 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -60,6 +60,8 @@ def __init__( smile_name: str, smile_type: str, smile_version: Version | None, + _zones: dict[str, GwEntityData] = {}, + gw_entities: dict[str, GwEntityData] = {}, ) -> None: """Set the constructor for this class.""" self._cooling_present = _cooling_present From aba5f8d19f40313a0d8343d9cb9be0201aa123b1 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 25 Jan 2025 15:23:35 +0100 Subject: [PATCH 47/66] Sort --- plugwise/helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugwise/helper.py b/plugwise/helper.py index c8236ff75..00d433e0c 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -78,13 +78,13 @@ def __init__(self) -> None: self._loc_data: dict[str, ThermoLoc] self._schedule_old_states: dict[str, dict[str, str]] self._gateway_id: str = NONE + self._zones: dict[str, GwEntityData] self.gw_entities: dict[str, GwEntityData] self.smile_hw_version: str | None self.smile_mac_address: str | None self.smile_model: str self.smile_model_id: str | None self.smile_version: version.Version | None - self._zones: dict[str, GwEntityData] SmileCommon.__init__(self) def _all_appliances(self) -> None: From 21cae26780e91d97a2479612a027e835886d3b97 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sat, 25 Jan 2025 15:25:32 +0100 Subject: [PATCH 48/66] Bump to a7 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3342c770b..e1f767bb2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plugwise" -version = "1.7.0a6" +version = "1.7.0a7" license = {file = "LICENSE"} description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3." readme = "README.md" From 35f074143c069f9537a8a7b2c6453be50b3b2db5 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 26 Jan 2025 12:03:48 +0100 Subject: [PATCH 49/66] Correct attributes --- plugwise/common.py | 2 +- plugwise/data.py | 2 +- plugwise/legacy/smile.py | 2 -- plugwise/smile.py | 6 ++---- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/plugwise/common.py b/plugwise/common.py index b4049b699..25f9e2512 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -38,7 +38,7 @@ def __init__(self) -> None: self._count: int self._domain_objects: etree self._on_off_device: bool - self.gw_entities: dict[str, GwEntityData] + self.gw_entities: dict[str, GwEntityData] = {} self.smile_name: str self.smile_type: str diff --git a/plugwise/data.py b/plugwise/data.py index ae14f2f86..e89720740 100644 --- a/plugwise/data.py +++ b/plugwise/data.py @@ -28,7 +28,7 @@ class SmileData(SmileHelper): def __init__(self) -> None: """Init.""" self._smile_props: SmileProps - self.gw_entities: dict[str, GwEntityData] + self._zones: dict[str, GwEntityData] = {} SmileHelper.__init__(self) def _all_entity_data(self) -> None: diff --git a/plugwise/legacy/smile.py b/plugwise/legacy/smile.py index d00a3fb10..744336711 100644 --- a/plugwise/legacy/smile.py +++ b/plugwise/legacy/smile.py @@ -52,7 +52,6 @@ def __init__( smile_type: str, smile_version: Version | None, smile_zigbee_mac_address: str | None, - gw_entities: dict[str, GwEntityData] = {}, ) -> None: """Set the constructor for this class.""" self._cooling_present = False @@ -111,7 +110,6 @@ async def async_update(self) -> dict[str, GwEntityData]: LOGGER.info( "Performing daily full-update, reload the Plugwise integration when a single entity becomes unavailable." ) - self.gw_entities: dict[str, GwEntityData] = {} try: await self.full_xml_update() self.get_all_gateway_entities() diff --git a/plugwise/smile.py b/plugwise/smile.py index dc90560f6..248fad8e7 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -60,8 +60,6 @@ def __init__( smile_name: str, smile_type: str, smile_version: Version | None, - _zones: dict[str, GwEntityData] = {}, - gw_entities: dict[str, GwEntityData] = {}, ) -> None: """Set the constructor for this class.""" self._cooling_present = _cooling_present @@ -116,8 +114,8 @@ async def async_update(self) -> dict[str, GwEntityData]: Any change in the connected entities will be detected immediately. """ - self.gw_entities: dict[str, GwEntityData] = {} - self._zones: dict[str, GwEntityData] = {} + self._zones = {} + self.gw_entities = {} try: await self.full_xml_update() self.get_all_gateway_entities() From 31e9b7ead741cc1ef25c5451e0f0f32d02c7d9e7 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 26 Jan 2025 15:23:15 +0100 Subject: [PATCH 50/66] Init self_heater_id properly --- plugwise/common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugwise/common.py b/plugwise/common.py index 25f9e2512..3afae5f73 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -9,6 +9,7 @@ from plugwise.constants import ( ANNA, + NONE, SPECIAL_PLUG_TYPES, SWITCH_GROUP_TYPES, ApplianceType, @@ -37,6 +38,7 @@ def __init__(self) -> None: self._cooling_present: bool self._count: int self._domain_objects: etree + self._heater_id: str = NONE self._on_off_device: bool self.gw_entities: dict[str, GwEntityData] = {} self.smile_name: str From 2cbd488f85f3846f302948dd737f8fbd8d133361 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 26 Jan 2025 15:31:32 +0100 Subject: [PATCH 51/66] Move count_data_items function to utils --- plugwise/common.py | 13 ------------- plugwise/helper.py | 3 ++- plugwise/legacy/helper.py | 3 ++- plugwise/util.py | 16 ++++++++++++++++ 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/plugwise/common.py b/plugwise/common.py index 3afae5f73..96bb783de 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -135,19 +135,6 @@ def _collect_power_values( key = cast(SensorType, loc.key_string) data["sensors"][key] = loc.f_val - def _count_data_items(self, data: GwEntityData) -> None: - """When present, count the binary_sensors, sensors and switches dict-items, don't count the dicts. - - Also, count the remaining single data items, the amount of dicts present have already been pre-subtracted in the previous step. - """ - if "binary_sensors" in data: - self._count += len(data["binary_sensors"]) - 1 - if "sensors" in data: - self._count += len(data["sensors"]) - 1 - if "switches" in data: - self._count += len(data["switches"]) - 1 - self._count += len(data) - def _power_data_peak_value(self, loc: Munch, legacy: bool) -> Munch: """Helper-function for _power_data_from_location() and _power_data_from_modules().""" loc.found = True diff --git a/plugwise/helper.py b/plugwise/helper.py index 00d433e0c..04369ce03 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -45,6 +45,7 @@ from plugwise.util import ( check_model, common_match_cases, + count_data_items, format_measure, skip_obsolete_measurements, ) @@ -424,7 +425,7 @@ def _appliance_measurements( appl_i_loc.text, ENERGY_WATT_HOUR ) - self._count_data_items(data) + self._count = count_data_items(self._count, data) def _get_toggle_state( self, xml: etree, toggle: str, name: ToggleNameType, data: GwEntityData diff --git a/plugwise/legacy/helper.py b/plugwise/legacy/helper.py index 98a5444cb..3a308d307 100644 --- a/plugwise/legacy/helper.py +++ b/plugwise/legacy/helper.py @@ -36,6 +36,7 @@ ) from plugwise.util import ( common_match_cases, + count_data_items, format_measure, skip_obsolete_measurements, version_to_model, @@ -340,7 +341,7 @@ def _appliance_measurements( appl_i_loc.text, ENERGY_WATT_HOUR ) - self._count_data_items(data) + self._count = count_data_items(self._count, data) def _get_actuator_functionalities( self, xml: etree, entity: GwEntityData, data: GwEntityData diff --git a/plugwise/util.py b/plugwise/util.py index e20bb5edb..3140792e8 100644 --- a/plugwise/util.py +++ b/plugwise/util.py @@ -145,6 +145,22 @@ def common_match_cases( data["binary_sensors"]["low_battery"] = False +def count_data_items(count: int, data: GwEntityData) -> int: + """When present, count the binary_sensors, sensors and switches dict-items, don't count the dicts. + + Also, count the remaining single data items, the amount of dicts present have already been pre-subtracted in the previous step. + """ + if "binary_sensors" in data: + count += len(data["binary_sensors"]) - 1 + if "sensors" in data: + count += len(data["sensors"]) - 1 + if "switches" in data: + count += len(data["switches"]) - 1 + + count += len(data) + return count + + def escape_illegal_xml_characters(xmldata: str) -> str: """Replace illegal &-characters.""" return re.sub(r"&([^a-zA-Z#])", r"&\1", xmldata) From bf15635d2cc8a1176ffff196a41874aa793a64f7 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 26 Jan 2025 15:49:16 +0100 Subject: [PATCH 52/66] Remove not used selfs, from functions, move above Class --- plugwise/common.py | 160 +++++++++++++++++++------------------- plugwise/helper.py | 4 +- plugwise/legacy/helper.py | 4 +- 3 files changed, 84 insertions(+), 84 deletions(-) diff --git a/plugwise/common.py b/plugwise/common.py index 96bb783de..6ec04e4d8 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -30,6 +30,86 @@ from munch import Munch +def collect_power_values( + data: GwEntityData, loc: Munch, tariff: str, legacy: bool = False +) -> None: + """Something.""" + for loc.peak_select in ("nl_peak", "nl_offpeak"): + loc.locator = ( + f'./{loc.log_type}[type="{loc.measurement}"]/period/' + f'measurement[@{tariff}="{loc.peak_select}"]' + ) + if legacy: + loc.locator = ( + f"./{loc.meas_list[0]}_{loc.log_type}/measurement" + f'[@directionality="{loc.meas_list[1]}"][@{tariff}="{loc.peak_select}"]' + ) + + loc = power_data_peak_value(loc, legacy) + if not loc.found: + continue + + data = power_data_energy_diff(loc.measurement, loc.net_string, loc.f_val, data) + key = cast(SensorType, loc.key_string) + data["sensors"][key] = loc.f_val + + +def power_data_peak_value(loc: Munch, legacy: bool) -> Munch: + """Helper-function for _power_data_from_location() and _power_data_from_modules().""" + loc.found = True + if loc.logs.find(loc.locator) is None: + loc = check_alternative_location(loc, legacy) + if not loc.found: + return loc + + if (peak := loc.peak_select.split("_")[1]) == "offpeak": + peak = "off_peak" + log_found = loc.log_type.split("_")[0] + loc.key_string = f"{loc.measurement}_{peak}_{log_found}" + if "gas" in loc.measurement or loc.log_type == "point_meter": + loc.key_string = f"{loc.measurement}_{log_found}" + # Only for P1 Actual -------------------# + if "phase" in loc.measurement: + loc.key_string = f"{loc.measurement}" + # --------------------------------------# + loc.net_string = f"net_electricity_{log_found}" + val = loc.logs.find(loc.locator).text + loc.f_val = power_data_local_format(loc.attrs, loc.key_string, val) + + return loc + + +def power_data_energy_diff( + measurement: str, + net_string: SensorType, + f_val: float | int, + data: GwEntityData, +) -> GwEntityData: + """Calculate differential energy.""" + if ( + "electricity" in measurement + and "phase" not in measurement + and "interval" not in net_string + ): + diff = 1 + if "produced" in measurement: + diff = -1 + if net_string not in data["sensors"]: + tmp_val: float | int = 0 + else: + tmp_val = data["sensors"][net_string] + + if isinstance(f_val, int): + tmp_val += f_val * diff + else: + tmp_val += float(f_val * diff) + tmp_val = float(f"{round(tmp_val, 3):.3f}") + + data["sensors"][net_string] = tmp_val + + return data + + class SmileCommon: """The SmileCommon class.""" @@ -110,86 +190,6 @@ def _appl_thermostat_info( return appl - def _collect_power_values( - self, data: GwEntityData, loc: Munch, tariff: str, legacy: bool = False - ) -> None: - """Something.""" - for loc.peak_select in ("nl_peak", "nl_offpeak"): - loc.locator = ( - f'./{loc.log_type}[type="{loc.measurement}"]/period/' - f'measurement[@{tariff}="{loc.peak_select}"]' - ) - if legacy: - loc.locator = ( - f"./{loc.meas_list[0]}_{loc.log_type}/measurement" - f'[@directionality="{loc.meas_list[1]}"][@{tariff}="{loc.peak_select}"]' - ) - - loc = self._power_data_peak_value(loc, legacy) - if not loc.found: - continue - - data = self._power_data_energy_diff( - loc.measurement, loc.net_string, loc.f_val, data - ) - key = cast(SensorType, loc.key_string) - data["sensors"][key] = loc.f_val - - def _power_data_peak_value(self, loc: Munch, legacy: bool) -> Munch: - """Helper-function for _power_data_from_location() and _power_data_from_modules().""" - loc.found = True - if loc.logs.find(loc.locator) is None: - loc = check_alternative_location(loc, legacy) - if not loc.found: - return loc - - if (peak := loc.peak_select.split("_")[1]) == "offpeak": - peak = "off_peak" - log_found = loc.log_type.split("_")[0] - loc.key_string = f"{loc.measurement}_{peak}_{log_found}" - if "gas" in loc.measurement or loc.log_type == "point_meter": - loc.key_string = f"{loc.measurement}_{log_found}" - # Only for P1 Actual -------------------# - if "phase" in loc.measurement: - loc.key_string = f"{loc.measurement}" - # --------------------------------------# - loc.net_string = f"net_electricity_{log_found}" - val = loc.logs.find(loc.locator).text - loc.f_val = power_data_local_format(loc.attrs, loc.key_string, val) - - return loc - - def _power_data_energy_diff( - self, - measurement: str, - net_string: SensorType, - f_val: float | int, - data: GwEntityData, - ) -> GwEntityData: - """Calculate differential energy.""" - if ( - "electricity" in measurement - and "phase" not in measurement - and "interval" not in net_string - ): - diff = 1 - if "produced" in measurement: - diff = -1 - if net_string not in data["sensors"]: - tmp_val: float | int = 0 - else: - tmp_val = data["sensors"][net_string] - - if isinstance(f_val, int): - tmp_val += f_val * diff - else: - tmp_val += float(f_val * diff) - tmp_val = float(f"{round(tmp_val, 3):.3f}") - - data["sensors"][net_string] = tmp_val - - return data - def _create_gw_entities(self, appl: Munch) -> None: """Helper-function for creating/updating gw_entities.""" self.gw_entities[appl.entity_id] = {"dev_class": appl.pwclass} diff --git a/plugwise/helper.py b/plugwise/helper.py index 04369ce03..cc0ea9a2c 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -8,7 +8,7 @@ import datetime as dt from typing import cast -from plugwise.common import SmileCommon +from plugwise.common import SmileCommon, collect_power_values from plugwise.constants import ( ACTIVE_ACTUATORS, ACTUATOR_CLASSES, @@ -389,7 +389,7 @@ def _power_data_from_location(self) -> GwEntityData: loc.logs = self._home_location.find("./logs") for loc.measurement, loc.attrs in P1_MEASUREMENTS.items(): for loc.log_type in log_list: - self._collect_power_values(data, loc, t_string) + collect_power_values(data, loc, t_string) self._count += len(data["sensors"]) return data diff --git a/plugwise/legacy/helper.py b/plugwise/legacy/helper.py index 3a308d307..03dfbb1c0 100644 --- a/plugwise/legacy/helper.py +++ b/plugwise/legacy/helper.py @@ -7,7 +7,7 @@ from typing import cast -from plugwise.common import SmileCommon +from plugwise.common import SmileCommon, collect_power_values from plugwise.constants import ( ACTIVE_ACTUATORS, ACTUATOR_CLASSES, @@ -308,7 +308,7 @@ def _power_data_from_modules(self) -> GwEntityData: loc.meas_list = loc.measurement.split("_") for loc.logs in mod_logs: for loc.log_type in mod_list: - self._collect_power_values(data, loc, t_string, legacy=True) + collect_power_values(data, loc, t_string, legacy=True) self._count += len(data["sensors"]) return data From 8f8aed2405dfe86d14842060f78a93f435142046 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 26 Jan 2025 15:52:48 +0100 Subject: [PATCH 53/66] Move another --- plugwise/common.py | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/plugwise/common.py b/plugwise/common.py index 6ec04e4d8..2863d8c98 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -54,6 +54,21 @@ def collect_power_values( data["sensors"][key] = loc.f_val +def get_zigbee_data(module: etree, module_data: ModuleData, legacy: bool) -> None: + """Helper-function for _get_module_data().""" + if legacy: + # Stretches + if (router := module.find("./protocols/network_router")) is not None: + module_data["zigbee_mac_address"] = router.find("mac_address").text + # Also look for the Circle+/Stealth M+ + if (coord := module.find("./protocols/network_coordinator")) is not None: + module_data["zigbee_mac_address"] = coord.find("mac_address").text + # Adam + elif (zb_node := module.find("./protocols/zig_bee_node")) is not None: + module_data["zigbee_mac_address"] = zb_node.find("mac_address").text + module_data["reachable"] = zb_node.find("reachable").text == "true" + + def power_data_peak_value(loc: Munch, legacy: bool) -> Munch: """Helper-function for _power_data_from_location() and _power_data_from_modules().""" loc.found = True @@ -310,22 +325,6 @@ def _get_module_data( module_data["vendor_model"] = module.find("vendor_model").text module_data["hardware_version"] = module.find("hardware_version").text module_data["firmware_version"] = module.find("firmware_version").text - self._get_zigbee_data(module, module_data, legacy) + get_zigbee_data(module, module_data, legacy) return module_data - - def _get_zigbee_data( - self, module: etree, module_data: ModuleData, legacy: bool - ) -> None: - """Helper-function for _get_module_data().""" - if legacy: - # Stretches - if (router := module.find("./protocols/network_router")) is not None: - module_data["zigbee_mac_address"] = router.find("mac_address").text - # Also look for the Circle+/Stealth M+ - if (coord := module.find("./protocols/network_coordinator")) is not None: - module_data["zigbee_mac_address"] = coord.find("mac_address").text - # Adam - elif (zb_node := module.find("./protocols/zig_bee_node")) is not None: - module_data["zigbee_mac_address"] = zb_node.find("mac_address").text - module_data["reachable"] = zb_node.find("reachable").text == "true" From 3d1e92120c2b2e8f4f5772e9868adcdef7f2b9d3 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 26 Jan 2025 16:02:15 +0100 Subject: [PATCH 54/66] Move the power-related functions to util --- plugwise/common.py | 83 --------------------------------------- plugwise/helper.py | 3 +- plugwise/legacy/helper.py | 3 +- plugwise/util.py | 80 +++++++++++++++++++++++++++++++++++++ 4 files changed, 84 insertions(+), 85 deletions(-) diff --git a/plugwise/common.py b/plugwise/common.py index 2863d8c98..a9270736b 100644 --- a/plugwise/common.py +++ b/plugwise/common.py @@ -15,14 +15,11 @@ ApplianceType, GwEntityData, ModuleData, - SensorType, ) from plugwise.util import ( - check_alternative_location, check_heater_central, check_model, get_vendor_name, - power_data_local_format, return_valid, ) @@ -30,30 +27,6 @@ from munch import Munch -def collect_power_values( - data: GwEntityData, loc: Munch, tariff: str, legacy: bool = False -) -> None: - """Something.""" - for loc.peak_select in ("nl_peak", "nl_offpeak"): - loc.locator = ( - f'./{loc.log_type}[type="{loc.measurement}"]/period/' - f'measurement[@{tariff}="{loc.peak_select}"]' - ) - if legacy: - loc.locator = ( - f"./{loc.meas_list[0]}_{loc.log_type}/measurement" - f'[@directionality="{loc.meas_list[1]}"][@{tariff}="{loc.peak_select}"]' - ) - - loc = power_data_peak_value(loc, legacy) - if not loc.found: - continue - - data = power_data_energy_diff(loc.measurement, loc.net_string, loc.f_val, data) - key = cast(SensorType, loc.key_string) - data["sensors"][key] = loc.f_val - - def get_zigbee_data(module: etree, module_data: ModuleData, legacy: bool) -> None: """Helper-function for _get_module_data().""" if legacy: @@ -69,62 +42,6 @@ def get_zigbee_data(module: etree, module_data: ModuleData, legacy: bool) -> Non module_data["reachable"] = zb_node.find("reachable").text == "true" -def power_data_peak_value(loc: Munch, legacy: bool) -> Munch: - """Helper-function for _power_data_from_location() and _power_data_from_modules().""" - loc.found = True - if loc.logs.find(loc.locator) is None: - loc = check_alternative_location(loc, legacy) - if not loc.found: - return loc - - if (peak := loc.peak_select.split("_")[1]) == "offpeak": - peak = "off_peak" - log_found = loc.log_type.split("_")[0] - loc.key_string = f"{loc.measurement}_{peak}_{log_found}" - if "gas" in loc.measurement or loc.log_type == "point_meter": - loc.key_string = f"{loc.measurement}_{log_found}" - # Only for P1 Actual -------------------# - if "phase" in loc.measurement: - loc.key_string = f"{loc.measurement}" - # --------------------------------------# - loc.net_string = f"net_electricity_{log_found}" - val = loc.logs.find(loc.locator).text - loc.f_val = power_data_local_format(loc.attrs, loc.key_string, val) - - return loc - - -def power_data_energy_diff( - measurement: str, - net_string: SensorType, - f_val: float | int, - data: GwEntityData, -) -> GwEntityData: - """Calculate differential energy.""" - if ( - "electricity" in measurement - and "phase" not in measurement - and "interval" not in net_string - ): - diff = 1 - if "produced" in measurement: - diff = -1 - if net_string not in data["sensors"]: - tmp_val: float | int = 0 - else: - tmp_val = data["sensors"][net_string] - - if isinstance(f_val, int): - tmp_val += f_val * diff - else: - tmp_val += float(f_val * diff) - tmp_val = float(f"{round(tmp_val, 3):.3f}") - - data["sensors"][net_string] = tmp_val - - return data - - class SmileCommon: """The SmileCommon class.""" diff --git a/plugwise/helper.py b/plugwise/helper.py index cc0ea9a2c..5075f408d 100644 --- a/plugwise/helper.py +++ b/plugwise/helper.py @@ -8,7 +8,7 @@ import datetime as dt from typing import cast -from plugwise.common import SmileCommon, collect_power_values +from plugwise.common import SmileCommon from plugwise.constants import ( ACTIVE_ACTUATORS, ACTUATOR_CLASSES, @@ -44,6 +44,7 @@ ) from plugwise.util import ( check_model, + collect_power_values, common_match_cases, count_data_items, format_measure, diff --git a/plugwise/legacy/helper.py b/plugwise/legacy/helper.py index 03dfbb1c0..b00e3b690 100644 --- a/plugwise/legacy/helper.py +++ b/plugwise/legacy/helper.py @@ -7,7 +7,7 @@ from typing import cast -from plugwise.common import SmileCommon, collect_power_values +from plugwise.common import SmileCommon from plugwise.constants import ( ACTIVE_ACTUATORS, ACTUATOR_CLASSES, @@ -35,6 +35,7 @@ ThermoLoc, ) from plugwise.util import ( + collect_power_values, common_match_cases, count_data_items, format_measure, diff --git a/plugwise/util.py b/plugwise/util.py index 3140792e8..c7ad9c988 100644 --- a/plugwise/util.py +++ b/plugwise/util.py @@ -116,6 +116,30 @@ def check_model(name: str | None, vendor_name: str | None) -> str | None: return None +def collect_power_values( + data: GwEntityData, loc: Munch, tariff: str, legacy: bool = False +) -> None: + """Something.""" + for loc.peak_select in ("nl_peak", "nl_offpeak"): + loc.locator = ( + f'./{loc.log_type}[type="{loc.measurement}"]/period/' + f'measurement[@{tariff}="{loc.peak_select}"]' + ) + if legacy: + loc.locator = ( + f"./{loc.meas_list[0]}_{loc.log_type}/measurement" + f'[@directionality="{loc.meas_list[1]}"][@{tariff}="{loc.peak_select}"]' + ) + + loc = power_data_peak_value(loc, legacy) + if not loc.found: + continue + + data = power_data_energy_diff(loc.measurement, loc.net_string, loc.f_val, data) + key = cast(SensorType, loc.key_string) + data["sensors"][key] = loc.f_val + + def common_match_cases( measurement: str, attrs: DATA | UOM, @@ -199,6 +223,37 @@ def get_vendor_name(module: etree, model_data: ModuleData) -> ModuleData: return model_data +def power_data_energy_diff( + measurement: str, + net_string: SensorType, + f_val: float | int, + data: GwEntityData, +) -> GwEntityData: + """Calculate differential energy.""" + if ( + "electricity" in measurement + and "phase" not in measurement + and "interval" not in net_string + ): + diff = 1 + if "produced" in measurement: + diff = -1 + if net_string not in data["sensors"]: + tmp_val: float | int = 0 + else: + tmp_val = data["sensors"][net_string] + + if isinstance(f_val, int): + tmp_val += f_val * diff + else: + tmp_val += float(f_val * diff) + tmp_val = float(f"{round(tmp_val, 3):.3f}") + + data["sensors"][net_string] = tmp_val + + return data + + def power_data_local_format( attrs: dict[str, str], key_string: str, val: str ) -> float | int: @@ -212,6 +267,31 @@ def power_data_local_format( return format_measure(val, attrs_uom) +def power_data_peak_value(loc: Munch, legacy: bool) -> Munch: + """Helper-function for _power_data_from_location() and _power_data_from_modules().""" + loc.found = True + if loc.logs.find(loc.locator) is None: + loc = check_alternative_location(loc, legacy) + if not loc.found: + return loc + + if (peak := loc.peak_select.split("_")[1]) == "offpeak": + peak = "off_peak" + log_found = loc.log_type.split("_")[0] + loc.key_string = f"{loc.measurement}_{peak}_{log_found}" + if "gas" in loc.measurement or loc.log_type == "point_meter": + loc.key_string = f"{loc.measurement}_{log_found}" + # Only for P1 Actual -------------------# + if "phase" in loc.measurement: + loc.key_string = f"{loc.measurement}" + # --------------------------------------# + loc.net_string = f"net_electricity_{log_found}" + val = loc.logs.find(loc.locator).text + loc.f_val = power_data_local_format(loc.attrs, loc.key_string, val) + + return loc + + def remove_empty_platform_dicts(data: GwEntityData) -> None: """Helper-function for removing any empty platform dicts.""" if not data["binary_sensors"]: From 5fabaf81b51440cb8e158ec733b3d4299294b046 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Sun, 26 Jan 2025 16:06:31 +0100 Subject: [PATCH 55/66] Remove pylint-disable --- plugwise/__init__.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugwise/__init__.py b/plugwise/__init__.py index 64c523b5c..992d67448 100644 --- a/plugwise/__init__.py +++ b/plugwise/__init__.py @@ -41,8 +41,6 @@ class Smile(SmileComm): """The main Plugwise Smile API class.""" - # pylint: disable=too-many-instance-attributes, too-many-public-methods - def __init__( self, host: str, From d8abe036a7beacbe3a23b32b2b9a78274f6228d0 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Tue, 28 Jan 2025 20:02:52 +0100 Subject: [PATCH 56/66] Change legacy initial testing --- tests/test_init.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_init.py b/tests/test_init.py index 429635cae..14e7afc82 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -606,8 +606,9 @@ def test_and_assert(test_dict, data, header): if initialize: _LOGGER.info("Asserting testdata:") if smile.smile_legacy: - await smile.full_xml_update() - smile.get_all_gateway_entities() + # await smile.full_xml_update() + # smile.get_all_gateway_entities() + smile._previous_day_number = 7 data = await smile.async_update() assert smile._timeout == 30 else: From 2be73267c7f29b978fa214c16a30b40e84b9b60b Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Tue, 28 Jan 2025 20:04:42 +0100 Subject: [PATCH 57/66] Change previous_day_number to 7 --- plugwise/legacy/smile.py | 2 +- tests/test_init.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/plugwise/legacy/smile.py b/plugwise/legacy/smile.py index 744336711..f20e2e92d 100644 --- a/plugwise/legacy/smile.py +++ b/plugwise/legacy/smile.py @@ -73,7 +73,7 @@ def __init__( self.smile_zigbee_mac_address = smile_zigbee_mac_address SmileLegacyData.__init__(self) - self._previous_day_number: str = "0" + self._previous_day_number: str = "7" async def full_xml_update(self) -> None: """Perform a first fetch of the Plugwise server XML data.""" diff --git a/tests/test_init.py b/tests/test_init.py index 14e7afc82..68b9cfc7e 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -608,7 +608,6 @@ def test_and_assert(test_dict, data, header): if smile.smile_legacy: # await smile.full_xml_update() # smile.get_all_gateway_entities() - smile._previous_day_number = 7 data = await smile.async_update() assert smile._timeout == 30 else: From 83b75e9abc09e31fdd24f38a7d374f86be497225 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Tue, 28 Jan 2025 20:11:12 +0100 Subject: [PATCH 58/66] Add first_update detection for legacy --- plugwise/legacy/smile.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/plugwise/legacy/smile.py b/plugwise/legacy/smile.py index f20e2e92d..48c657aff 100644 --- a/plugwise/legacy/smile.py +++ b/plugwise/legacy/smile.py @@ -73,7 +73,8 @@ def __init__( self.smile_zigbee_mac_address = smile_zigbee_mac_address SmileLegacyData.__init__(self) - self._previous_day_number: str = "7" + self._first_update = True + self._previous_day_number: str = "0" async def full_xml_update(self) -> None: """Perform a first fetch of the Plugwise server XML data.""" @@ -103,10 +104,7 @@ async def async_update(self) -> dict[str, GwEntityData]: Otherwise perform an incremental update: only collect the entities updated data and states. """ day_number = dt.datetime.now().strftime("%w") - if ( - day_number # pylint: disable=consider-using-assignment-expr - != self._previous_day_number - ): + if self._first_update or day_number != self._previous_day_number: LOGGER.info( "Performing daily full-update, reload the Plugwise integration when a single entity becomes unavailable." ) @@ -134,6 +132,7 @@ async def async_update(self) -> dict[str, GwEntityData]: except KeyError as err: # pragma: no cover raise DataMissingError("No legacy Plugwise data received") from err + self._first_update = False self._previous_day_number = day_number return self.gw_entities From 00a8ca564a3e7e7f78d55b98a81b7344b2553910 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Tue, 28 Jan 2025 20:13:59 +0100 Subject: [PATCH 59/66] Rework test-async_updating --- tests/test_init.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/test_init.py b/tests/test_init.py index 68b9cfc7e..028e33c11 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -605,13 +605,10 @@ def test_and_assert(test_dict, data, header): with freeze_time(test_time): if initialize: _LOGGER.info("Asserting testdata:") + data = await smile.async_update() if smile.smile_legacy: - # await smile.full_xml_update() - # smile.get_all_gateway_entities() - data = await smile.async_update() assert smile._timeout == 30 else: - data = await smile.async_update() assert smile._timeout == 10 else: _LOGGER.info("Asserting updated testdata:") From 702cfec86bfdaabea3a989113b3dfa2b8cd6f95c Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Tue, 28 Jan 2025 20:16:49 +0100 Subject: [PATCH 60/66] Remove no longer used full_xml_update() function --- plugwise/__init__.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/plugwise/__init__.py b/plugwise/__init__.py index 992d67448..225fc9b68 100644 --- a/plugwise/__init__.py +++ b/plugwise/__init__.py @@ -321,10 +321,6 @@ async def _smile_detect_legacy( self.smile_legacy = True return return_model - async def full_xml_update(self) -> None: - """Perform a first fetch of the Plugwise server XML data.""" - await self._smile_api.full_xml_update() - def get_all_gateway_entities(self) -> None: """Collect the Plugwise Gateway entities and their data and states from the received raw XML-data.""" self._smile_api.get_all_gateway_entities() From 3106c4ddf4d8005181ece2281a5c65e1ac562730 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Tue, 28 Jan 2025 20:18:14 +0100 Subject: [PATCH 61/66] Bump to a8 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e1f767bb2..50a0a43ae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plugwise" -version = "1.7.0a7" +version = "1.7.0a8" license = {file = "LICENSE"} description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3." readme = "README.md" From d6172976b7e9acbce7b430e59a0048d11a64d7d4 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Wed, 29 Jan 2025 17:31:31 +0100 Subject: [PATCH 62/66] Also remove unneeded get_all_gateway_entities() function --- plugwise/__init__.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/plugwise/__init__.py b/plugwise/__init__.py index 225fc9b68..b9fa4f090 100644 --- a/plugwise/__init__.py +++ b/plugwise/__init__.py @@ -321,10 +321,6 @@ async def _smile_detect_legacy( self.smile_legacy = True return return_model - def get_all_gateway_entities(self) -> None: - """Collect the Plugwise Gateway entities and their data and states from the received raw XML-data.""" - self._smile_api.get_all_gateway_entities() - async def async_update(self) -> dict[str, GwEntityData]: """Update the Plughwise Gateway entities and their data and states.""" data: dict[str, GwEntityData] = {} From 945f21eb6037c67a2083b1bd0ab092ac0610e70c Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Wed, 29 Jan 2025 17:47:00 +0100 Subject: [PATCH 63/66] Add debug-message for testing new legacy code --- plugwise/legacy/smile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugwise/legacy/smile.py b/plugwise/legacy/smile.py index 48c657aff..3af6f2a44 100644 --- a/plugwise/legacy/smile.py +++ b/plugwise/legacy/smile.py @@ -103,6 +103,7 @@ async def async_update(self) -> dict[str, GwEntityData]: Otherwise perform an incremental update: only collect the entities updated data and states. """ + LOGGER.debug("HOI First update: %s", self._first_update) day_number = dt.datetime.now().strftime("%w") if self._first_update or day_number != self._previous_day_number: LOGGER.info( From d0863cb1c34d07f2d86801e784820b040376ae20 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Wed, 29 Jan 2025 17:47:24 +0100 Subject: [PATCH 64/66] Bump to a9 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 50a0a43ae..85e5d9367 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plugwise" -version = "1.7.0a8" +version = "1.7.0a9" license = {file = "LICENSE"} description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3." readme = "README.md" From 0f9315e9281e01a7f644c5784b7e79bc72adef48 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Wed, 29 Jan 2025 18:09:52 +0100 Subject: [PATCH 65/66] Remove debug-test-message --- plugwise/legacy/smile.py | 1 - 1 file changed, 1 deletion(-) diff --git a/plugwise/legacy/smile.py b/plugwise/legacy/smile.py index 3af6f2a44..48c657aff 100644 --- a/plugwise/legacy/smile.py +++ b/plugwise/legacy/smile.py @@ -103,7 +103,6 @@ async def async_update(self) -> dict[str, GwEntityData]: Otherwise perform an incremental update: only collect the entities updated data and states. """ - LOGGER.debug("HOI First update: %s", self._first_update) day_number = dt.datetime.now().strftime("%w") if self._first_update or day_number != self._previous_day_number: LOGGER.info( From 340f79515e2fad0f440ccef6f09963f36f0a4f88 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk Date: Thu, 30 Jan 2025 08:04:30 +0100 Subject: [PATCH 66/66] Update CHANGELOG, set to v1.7.0 release-verwsion --- CHANGELOG.md | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12f392c90..47ab7ba91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,10 @@ # Changelog -## Ongoing +## v1.7.0 - Continuous improvements [#678](https://github.com/plugwise/python-plugwise/pull/678) - Refresh Anna_Elga_2 userdata and adapt, add missing item-count, line-up test-data headers [#679](https://github.com/plugwise/python-plugwise/pull/679) -- Rework code: output a single dict, add gw_data items as Smile-properties [#690](https://github.com/plugwise/python-plugwise/pull/690) +- Rework code: output a single dict, add gw_data items as Smile-properties [#698](https://github.com/plugwise/python-plugwise/pull/698) ## v1.6.4 diff --git a/pyproject.toml b/pyproject.toml index 85e5d9367..cc0aa0c20 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plugwise" -version = "1.7.0a9" +version = "1.7.0" license = {file = "LICENSE"} description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3." readme = "README.md"