diff --git a/src/tadoasync/tadoasync.py b/src/tadoasync/tadoasync.py index 713ac7b..d4305f6 100644 --- a/src/tadoasync/tadoasync.py +++ b/src/tadoasync/tadoasync.py @@ -53,7 +53,6 @@ Weather, Zone, ZoneState, - ZoneStates, ) CLIENT_ID = "tado-web-app" @@ -242,7 +241,7 @@ async def get_zones(self) -> list[Zone]: obj = orjson.loads(response) return [Zone.from_dict(zone) for zone in obj] - async def get_zone_states(self) -> list[ZoneStates]: + async def get_zone_states(self) -> dict[str, ZoneState]: """Get the zone states.""" response = await self._request(f"homes/{self._home_id}/zoneStates") obj = orjson.loads(response) @@ -254,7 +253,7 @@ async def get_zone_states(self) -> list[ZoneStates]: for zone_state in zone_states.values(): await self.update_zone_data(zone_state) - return [ZoneStates(zone_states=zone_states)] + return zone_states async def get_zone_state(self, zone_id: int) -> ZoneState: """Get the zone state.""" diff --git a/tests/__snapshots__/test_tado.ambr b/tests/__snapshots__/test_tado.ambr index 84ca37c..c5a853f 100644 --- a/tests/__snapshots__/test_tado.ambr +++ b/tests/__snapshots__/test_tado.ambr @@ -2938,722 +2938,710 @@ }) # --- # name: test_get_zone_states_ac_power[zone_states_ac_power.dry.json] - list([ - dict({ - 'zone_states': dict({ - '1': dict({ - 'ac_power': 'ON', - 'ac_power_timestamp': '2024-07-05T04:02:40.867Z', - 'activity_data_points': dict({ - 'ac_power': dict({ - 'timestamp': '2024-07-05T04:02:40.867Z', - 'type': 'POWER', - 'value': 'ON', - }), - 'heating_power': None, - }), - 'available': True, - 'connection': None, - 'current_fan_level': None, - 'current_fan_speed': 'AUTO', - 'current_horizontal_swing_mode': None, - 'current_humidity': 62.0, - 'current_humidity_timestamp': '2024-07-05T04:02:07.396Z', - 'current_hvac_action': 'DRYING', - 'current_hvac_mode': 'DRY', - 'current_swing_mode': None, - 'current_temp': 25.01, - 'current_temp_timestamp': '2024-07-05T04:02:07.396Z', - 'current_vertical_swing_mode': None, - 'default_overlay_termination_duration': None, - 'default_overlay_termination_type': None, - 'geolocation_override': False, - 'geolocation_override_disable_time': None, - 'heating_power': None, - 'heating_power_percentage': None, - 'heating_power_timestamp': None, - 'is_away': False, - 'link': dict({ - 'state': 'ONLINE', - }), - 'next_schedule_change': None, - 'next_time_block': dict({ - 'start': '2024-07-05T08:00:00.000Z', - }), - 'open_window': None, - 'open_window_attr': None, - 'open_window_detected': False, - 'overlay': dict({ - 'projected_expiry': None, - 'setting': dict({ - 'fan_level': None, - 'fan_speed': None, - 'horizontal_swing': None, - 'mode': 'DRY', - 'power': 'ON', - 'swing': None, - 'temperature': None, - 'type': 'AIR_CONDITIONING', - 'vertical_swing': None, - }), - 'termination': dict({ - 'projected_expiry': None, - 'type': 'TADO_MODE', - 'type_skill_based_app': 'TADO_MODE', - }), - 'type': 'MANUAL', - }), - 'overlay_active': True, - 'overlay_termination_timestamp': None, - 'overlay_termination_type': 'TADO_MODE', - 'overlay_type': 'MANUAL', + dict({ + '1': dict({ + 'ac_power': 'ON', + 'ac_power_timestamp': '2024-07-05T04:02:40.867Z', + 'activity_data_points': dict({ + 'ac_power': dict({ + 'timestamp': '2024-07-05T04:02:40.867Z', + 'type': 'POWER', + 'value': 'ON', + }), + 'heating_power': None, + }), + 'available': True, + 'connection': None, + 'current_fan_level': None, + 'current_fan_speed': 'AUTO', + 'current_horizontal_swing_mode': None, + 'current_humidity': 62.0, + 'current_humidity_timestamp': '2024-07-05T04:02:07.396Z', + 'current_hvac_action': 'DRYING', + 'current_hvac_mode': 'DRY', + 'current_swing_mode': None, + 'current_temp': 25.01, + 'current_temp_timestamp': '2024-07-05T04:02:07.396Z', + 'current_vertical_swing_mode': None, + 'default_overlay_termination_duration': None, + 'default_overlay_termination_type': None, + 'geolocation_override': False, + 'geolocation_override_disable_time': None, + 'heating_power': None, + 'heating_power_percentage': None, + 'heating_power_timestamp': None, + 'is_away': False, + 'link': dict({ + 'state': 'ONLINE', + }), + 'next_schedule_change': None, + 'next_time_block': dict({ + 'start': '2024-07-05T08:00:00.000Z', + }), + 'open_window': None, + 'open_window_attr': None, + 'open_window_detected': False, + 'overlay': dict({ + 'projected_expiry': None, + 'setting': dict({ + 'fan_level': None, + 'fan_speed': None, + 'horizontal_swing': None, + 'mode': 'DRY', 'power': 'ON', - 'precision': 0.1, - 'preparation': False, - 'sensor_data_points': dict({ - 'humidity': dict({ - 'percentage': 62.0, - 'timestamp': '2024-07-05T04:02:07.396Z', - 'type': 'PERCENTAGE', - }), - 'inside_temperature': dict({ - 'celsius': 25.01, - 'fahrenheit': 77.02, - 'precision': dict({ - 'celsius': 0.1, - 'fahrenheit': 0.1, - }), - 'timestamp': '2024-07-05T04:02:07.396Z', - 'type': 'TEMPERATURE', - }), - }), - 'setting': dict({ - 'fan_level': None, - 'fan_speed': None, - 'horizontal_swing': None, - 'mode': 'DRY', - 'power': 'ON', - 'swing': None, - 'temperature': None, - 'type': 'AIR_CONDITIONING', - 'vertical_swing': None, + 'swing': None, + 'temperature': None, + 'type': 'AIR_CONDITIONING', + 'vertical_swing': None, + }), + 'termination': dict({ + 'projected_expiry': None, + 'type': 'TADO_MODE', + 'type_skill_based_app': 'TADO_MODE', + }), + 'type': 'MANUAL', + }), + 'overlay_active': True, + 'overlay_termination_timestamp': None, + 'overlay_termination_type': 'TADO_MODE', + 'overlay_type': 'MANUAL', + 'power': 'ON', + 'precision': 0.1, + 'preparation': False, + 'sensor_data_points': dict({ + 'humidity': dict({ + 'percentage': 62.0, + 'timestamp': '2024-07-05T04:02:07.396Z', + 'type': 'PERCENTAGE', + }), + 'inside_temperature': dict({ + 'celsius': 25.01, + 'fahrenheit': 77.02, + 'precision': dict({ + 'celsius': 0.1, + 'fahrenheit': 0.1, }), - 'tado_mode': 'HOME', - 'target_temp': None, - 'termination_condition': None, + 'timestamp': '2024-07-05T04:02:07.396Z', + 'type': 'TEMPERATURE', }), }), + 'setting': dict({ + 'fan_level': None, + 'fan_speed': None, + 'horizontal_swing': None, + 'mode': 'DRY', + 'power': 'ON', + 'swing': None, + 'temperature': None, + 'type': 'AIR_CONDITIONING', + 'vertical_swing': None, + }), + 'tado_mode': 'HOME', + 'target_temp': None, + 'termination_condition': None, }), - ]) + }) # --- # name: test_get_zone_states_ac_power[zone_states_ac_power.fan.json] - list([ - dict({ - 'zone_states': dict({ - '1': dict({ - 'ac_power': 'ON', - 'ac_power_timestamp': '2024-07-05T04:02:40.867Z', - 'activity_data_points': dict({ - 'ac_power': dict({ - 'timestamp': '2024-07-05T04:02:40.867Z', - 'type': 'POWER', - 'value': 'ON', - }), - 'heating_power': None, - }), - 'available': True, - 'connection': None, - 'current_fan_level': None, - 'current_fan_speed': 'AUTO', - 'current_horizontal_swing_mode': None, - 'current_humidity': 62.0, - 'current_humidity_timestamp': '2024-07-05T04:02:07.396Z', - 'current_hvac_action': 'FAN', - 'current_hvac_mode': 'FAN', - 'current_swing_mode': None, - 'current_temp': 25.01, - 'current_temp_timestamp': '2024-07-05T04:02:07.396Z', - 'current_vertical_swing_mode': None, - 'default_overlay_termination_duration': None, - 'default_overlay_termination_type': None, - 'geolocation_override': False, - 'geolocation_override_disable_time': None, - 'heating_power': None, - 'heating_power_percentage': None, - 'heating_power_timestamp': None, - 'is_away': False, - 'link': dict({ - 'state': 'ONLINE', - }), - 'next_schedule_change': None, - 'next_time_block': dict({ - 'start': '2024-07-05T08:00:00.000Z', - }), - 'open_window': None, - 'open_window_attr': None, - 'open_window_detected': False, - 'overlay': dict({ - 'projected_expiry': None, - 'setting': dict({ - 'fan_level': None, - 'fan_speed': None, - 'horizontal_swing': None, - 'mode': 'FAN', - 'power': 'ON', - 'swing': None, - 'temperature': None, - 'type': 'AIR_CONDITIONING', - 'vertical_swing': None, - }), - 'termination': dict({ - 'projected_expiry': None, - 'type': 'TADO_MODE', - 'type_skill_based_app': 'TADO_MODE', - }), - 'type': 'MANUAL', - }), - 'overlay_active': True, - 'overlay_termination_timestamp': None, - 'overlay_termination_type': 'TADO_MODE', - 'overlay_type': 'MANUAL', + dict({ + '1': dict({ + 'ac_power': 'ON', + 'ac_power_timestamp': '2024-07-05T04:02:40.867Z', + 'activity_data_points': dict({ + 'ac_power': dict({ + 'timestamp': '2024-07-05T04:02:40.867Z', + 'type': 'POWER', + 'value': 'ON', + }), + 'heating_power': None, + }), + 'available': True, + 'connection': None, + 'current_fan_level': None, + 'current_fan_speed': 'AUTO', + 'current_horizontal_swing_mode': None, + 'current_humidity': 62.0, + 'current_humidity_timestamp': '2024-07-05T04:02:07.396Z', + 'current_hvac_action': 'FAN', + 'current_hvac_mode': 'FAN', + 'current_swing_mode': None, + 'current_temp': 25.01, + 'current_temp_timestamp': '2024-07-05T04:02:07.396Z', + 'current_vertical_swing_mode': None, + 'default_overlay_termination_duration': None, + 'default_overlay_termination_type': None, + 'geolocation_override': False, + 'geolocation_override_disable_time': None, + 'heating_power': None, + 'heating_power_percentage': None, + 'heating_power_timestamp': None, + 'is_away': False, + 'link': dict({ + 'state': 'ONLINE', + }), + 'next_schedule_change': None, + 'next_time_block': dict({ + 'start': '2024-07-05T08:00:00.000Z', + }), + 'open_window': None, + 'open_window_attr': None, + 'open_window_detected': False, + 'overlay': dict({ + 'projected_expiry': None, + 'setting': dict({ + 'fan_level': None, + 'fan_speed': None, + 'horizontal_swing': None, + 'mode': 'FAN', 'power': 'ON', - 'precision': 0.1, - 'preparation': False, - 'sensor_data_points': dict({ - 'humidity': dict({ - 'percentage': 62.0, - 'timestamp': '2024-07-05T04:02:07.396Z', - 'type': 'PERCENTAGE', - }), - 'inside_temperature': dict({ - 'celsius': 25.01, - 'fahrenheit': 77.02, - 'precision': dict({ - 'celsius': 0.1, - 'fahrenheit': 0.1, - }), - 'timestamp': '2024-07-05T04:02:07.396Z', - 'type': 'TEMPERATURE', - }), - }), - 'setting': dict({ - 'fan_level': None, - 'fan_speed': None, - 'horizontal_swing': None, - 'mode': 'FAN', - 'power': 'ON', - 'swing': None, - 'temperature': None, - 'type': 'AIR_CONDITIONING', - 'vertical_swing': None, + 'swing': None, + 'temperature': None, + 'type': 'AIR_CONDITIONING', + 'vertical_swing': None, + }), + 'termination': dict({ + 'projected_expiry': None, + 'type': 'TADO_MODE', + 'type_skill_based_app': 'TADO_MODE', + }), + 'type': 'MANUAL', + }), + 'overlay_active': True, + 'overlay_termination_timestamp': None, + 'overlay_termination_type': 'TADO_MODE', + 'overlay_type': 'MANUAL', + 'power': 'ON', + 'precision': 0.1, + 'preparation': False, + 'sensor_data_points': dict({ + 'humidity': dict({ + 'percentage': 62.0, + 'timestamp': '2024-07-05T04:02:07.396Z', + 'type': 'PERCENTAGE', + }), + 'inside_temperature': dict({ + 'celsius': 25.01, + 'fahrenheit': 77.02, + 'precision': dict({ + 'celsius': 0.1, + 'fahrenheit': 0.1, }), - 'tado_mode': 'HOME', - 'target_temp': None, - 'termination_condition': None, + 'timestamp': '2024-07-05T04:02:07.396Z', + 'type': 'TEMPERATURE', }), }), + 'setting': dict({ + 'fan_level': None, + 'fan_speed': None, + 'horizontal_swing': None, + 'mode': 'FAN', + 'power': 'ON', + 'swing': None, + 'temperature': None, + 'type': 'AIR_CONDITIONING', + 'vertical_swing': None, + }), + 'tado_mode': 'HOME', + 'target_temp': None, + 'termination_condition': None, }), - ]) + }) # --- # name: test_get_zone_states_heating_power - list([ - dict({ - 'zone_states': dict({ - '1': dict({ - 'ac_power': None, - 'ac_power_timestamp': None, - 'activity_data_points': dict({ - 'ac_power': None, - 'heating_power': dict({ - 'percentage': 0.0, - 'timestamp': '2024-02-27T20:30:01.259Z', - 'type': 'PERCENTAGE', - 'value': None, - }), - }), - 'available': True, - 'connection': None, - 'current_fan_level': None, - 'current_fan_speed': None, - 'current_horizontal_swing_mode': None, - 'current_humidity': 51.0, - 'current_humidity_timestamp': '2024-02-27T20:37:02.553Z', - 'current_hvac_action': 'IDLE', - 'current_hvac_mode': 'HEAT', - 'current_swing_mode': None, - 'current_temp': 17.98, - 'current_temp_timestamp': '2024-02-27T20:37:02.553Z', - 'current_vertical_swing_mode': None, - 'default_overlay_termination_duration': None, - 'default_overlay_termination_type': None, - 'geolocation_override': False, - 'geolocation_override_disable_time': None, - 'heating_power': None, - 'heating_power_percentage': 0.0, - 'heating_power_timestamp': '2024-02-27T20:30:01.259Z', - 'is_away': False, - 'link': dict({ - 'state': 'ONLINE', - }), - 'next_schedule_change': dict({ - 'setting': dict({ - 'fan_level': None, - 'fan_speed': None, - 'horizontal_swing': None, - 'mode': None, - 'power': 'ON', - 'swing': None, - 'temperature': dict({ - 'celsius': 18.0, - 'fahrenheit': 64.4, - 'timestamp': None, - 'type': None, - }), - 'type': 'HEATING', - 'vertical_swing': None, - }), - 'start': '2024-02-27T21:00:00Z', - }), - 'next_time_block': dict({ - 'start': '2024-02-27T21:00:00.000Z', - }), - 'open_window': None, - 'open_window_attr': None, - 'open_window_detected': False, - 'overlay': dict({ - 'projected_expiry': None, - 'setting': dict({ - 'fan_level': None, - 'fan_speed': None, - 'horizontal_swing': None, - 'mode': None, - 'power': 'ON', - 'swing': None, - 'temperature': dict({ - 'celsius': 17.0, - 'fahrenheit': 62.6, - 'timestamp': None, - 'type': None, - }), - 'type': 'HEATING', - 'vertical_swing': None, - }), - 'termination': dict({ - 'projected_expiry': None, - 'type': 'MANUAL', - 'type_skill_based_app': 'MANUAL', - }), - 'type': 'MANUAL', - }), - 'overlay_active': True, - 'overlay_termination_timestamp': None, - 'overlay_termination_type': 'MANUAL', - 'overlay_type': 'MANUAL', + dict({ + '1': dict({ + 'ac_power': None, + 'ac_power_timestamp': None, + 'activity_data_points': dict({ + 'ac_power': None, + 'heating_power': dict({ + 'percentage': 0.0, + 'timestamp': '2024-02-27T20:30:01.259Z', + 'type': 'PERCENTAGE', + 'value': None, + }), + }), + 'available': True, + 'connection': None, + 'current_fan_level': None, + 'current_fan_speed': None, + 'current_horizontal_swing_mode': None, + 'current_humidity': 51.0, + 'current_humidity_timestamp': '2024-02-27T20:37:02.553Z', + 'current_hvac_action': 'IDLE', + 'current_hvac_mode': 'HEAT', + 'current_swing_mode': None, + 'current_temp': 17.98, + 'current_temp_timestamp': '2024-02-27T20:37:02.553Z', + 'current_vertical_swing_mode': None, + 'default_overlay_termination_duration': None, + 'default_overlay_termination_type': None, + 'geolocation_override': False, + 'geolocation_override_disable_time': None, + 'heating_power': None, + 'heating_power_percentage': 0.0, + 'heating_power_timestamp': '2024-02-27T20:30:01.259Z', + 'is_away': False, + 'link': dict({ + 'state': 'ONLINE', + }), + 'next_schedule_change': dict({ + 'setting': dict({ + 'fan_level': None, + 'fan_speed': None, + 'horizontal_swing': None, + 'mode': None, 'power': 'ON', - 'precision': 0.1, - 'preparation': False, - 'sensor_data_points': dict({ - 'humidity': dict({ - 'percentage': 51.0, - 'timestamp': '2024-02-27T20:37:02.553Z', - 'type': 'PERCENTAGE', - }), - 'inside_temperature': dict({ - 'celsius': 17.98, - 'fahrenheit': 64.36, - 'precision': dict({ - 'celsius': 0.1, - 'fahrenheit': 0.1, - }), - 'timestamp': '2024-02-27T20:37:02.553Z', - 'type': 'TEMPERATURE', - }), - }), - 'setting': dict({ - 'fan_level': None, - 'fan_speed': None, - 'horizontal_swing': None, - 'mode': None, - 'power': 'ON', - 'swing': None, - 'temperature': dict({ - 'celsius': 17.0, - 'fahrenheit': 62.6, - 'timestamp': None, - 'type': None, - }), - 'type': 'HEATING', - 'vertical_swing': None, - }), - 'tado_mode': 'HOME', - 'target_temp': 17.0, - 'termination_condition': None, - }), - '2': dict({ - 'ac_power': None, - 'ac_power_timestamp': None, - 'activity_data_points': dict({ - 'ac_power': None, - 'heating_power': dict({ - 'percentage': 11.0, - 'timestamp': '2024-02-27T20:37:22.791Z', - 'type': 'PERCENTAGE', - 'value': None, - }), - }), - 'available': True, - 'connection': None, - 'current_fan_level': None, - 'current_fan_speed': None, - 'current_horizontal_swing_mode': None, - 'current_humidity': 56.9, - 'current_humidity_timestamp': '2024-02-27T20:38:14.791Z', - 'current_hvac_action': 'HEATING', - 'current_hvac_mode': 'HEAT', - 'current_swing_mode': None, - 'current_temp': 14.89, - 'current_temp_timestamp': '2024-02-27T20:38:14.791Z', - 'current_vertical_swing_mode': None, - 'default_overlay_termination_duration': None, - 'default_overlay_termination_type': None, - 'geolocation_override': False, - 'geolocation_override_disable_time': None, - 'heating_power': None, - 'heating_power_percentage': 11.0, - 'heating_power_timestamp': '2024-02-27T20:37:22.791Z', - 'is_away': False, - 'link': dict({ - 'state': 'ONLINE', + 'swing': None, + 'temperature': dict({ + 'celsius': 18.0, + 'fahrenheit': 64.4, + 'timestamp': None, + 'type': None, }), - 'next_schedule_change': None, - 'next_time_block': dict({ - 'start': '2024-02-27T21:00:00.000Z', - }), - 'open_window': None, - 'open_window_attr': None, - 'open_window_detected': False, - 'overlay': dict({ - 'projected_expiry': None, - 'setting': dict({ - 'fan_level': None, - 'fan_speed': None, - 'horizontal_swing': None, - 'mode': None, - 'power': 'ON', - 'swing': None, - 'temperature': dict({ - 'celsius': 15.0, - 'fahrenheit': 59.0, - 'timestamp': None, - 'type': None, - }), - 'type': 'HEATING', - 'vertical_swing': None, - }), - 'termination': dict({ - 'projected_expiry': None, - 'type': 'MANUAL', - 'type_skill_based_app': 'MANUAL', - }), - 'type': 'MANUAL', - }), - 'overlay_active': True, - 'overlay_termination_timestamp': None, - 'overlay_termination_type': 'MANUAL', - 'overlay_type': 'MANUAL', + 'type': 'HEATING', + 'vertical_swing': None, + }), + 'start': '2024-02-27T21:00:00Z', + }), + 'next_time_block': dict({ + 'start': '2024-02-27T21:00:00.000Z', + }), + 'open_window': None, + 'open_window_attr': None, + 'open_window_detected': False, + 'overlay': dict({ + 'projected_expiry': None, + 'setting': dict({ + 'fan_level': None, + 'fan_speed': None, + 'horizontal_swing': None, + 'mode': None, 'power': 'ON', - 'precision': 0.1, - 'preparation': False, - 'sensor_data_points': dict({ - 'humidity': dict({ - 'percentage': 56.9, - 'timestamp': '2024-02-27T20:38:14.791Z', - 'type': 'PERCENTAGE', - }), - 'inside_temperature': dict({ - 'celsius': 14.89, - 'fahrenheit': 58.8, - 'precision': dict({ - 'celsius': 0.1, - 'fahrenheit': 0.1, - }), - 'timestamp': '2024-02-27T20:38:14.791Z', - 'type': 'TEMPERATURE', - }), - }), - 'setting': dict({ - 'fan_level': None, - 'fan_speed': None, - 'horizontal_swing': None, - 'mode': None, - 'power': 'ON', - 'swing': None, - 'temperature': dict({ - 'celsius': 15.0, - 'fahrenheit': 59.0, - 'timestamp': None, - 'type': None, - }), - 'type': 'HEATING', - 'vertical_swing': None, + 'swing': None, + 'temperature': dict({ + 'celsius': 17.0, + 'fahrenheit': 62.6, + 'timestamp': None, + 'type': None, }), - 'tado_mode': 'HOME', - 'target_temp': 15.0, - 'termination_condition': None, - }), - '3': dict({ - 'ac_power': None, - 'ac_power_timestamp': None, - 'activity_data_points': dict({ - 'ac_power': None, - 'heating_power': dict({ - 'percentage': 0.0, - 'timestamp': '2024-02-27T20:28:21.301Z', - 'type': 'PERCENTAGE', - 'value': None, - }), - }), - 'available': True, - 'connection': None, - 'current_fan_level': None, - 'current_fan_speed': None, - 'current_horizontal_swing_mode': None, - 'current_humidity': 55.5, - 'current_humidity_timestamp': '2024-02-27T20:37:12.297Z', - 'current_hvac_action': 'IDLE', - 'current_hvac_mode': 'HEAT', - 'current_swing_mode': None, - 'current_temp': 17.52, - 'current_temp_timestamp': '2024-02-27T20:37:12.297Z', - 'current_vertical_swing_mode': None, - 'default_overlay_termination_duration': None, - 'default_overlay_termination_type': None, - 'geolocation_override': False, - 'geolocation_override_disable_time': None, - 'heating_power': None, - 'heating_power_percentage': 0.0, - 'heating_power_timestamp': '2024-02-27T20:28:21.301Z', - 'is_away': False, - 'link': dict({ - 'state': 'ONLINE', - }), - 'next_schedule_change': dict({ - 'setting': dict({ - 'fan_level': None, - 'fan_speed': None, - 'horizontal_swing': None, - 'mode': None, - 'power': 'ON', - 'swing': None, - 'temperature': dict({ - 'celsius': 18.0, - 'fahrenheit': 64.4, - 'timestamp': None, - 'type': None, - }), - 'type': 'HEATING', - 'vertical_swing': None, - }), - 'start': '2024-02-27T21:00:00Z', - }), - 'next_time_block': dict({ - 'start': '2024-02-27T21:00:00.000Z', - }), - 'open_window': None, - 'open_window_attr': None, - 'open_window_detected': False, - 'overlay': dict({ - 'projected_expiry': None, - 'setting': dict({ - 'fan_level': None, - 'fan_speed': None, - 'horizontal_swing': None, - 'mode': None, - 'power': 'ON', - 'swing': None, - 'temperature': dict({ - 'celsius': 17.0, - 'fahrenheit': 62.6, - 'timestamp': None, - 'type': None, - }), - 'type': 'HEATING', - 'vertical_swing': None, - }), - 'termination': dict({ - 'projected_expiry': None, - 'type': 'MANUAL', - 'type_skill_based_app': 'MANUAL', - }), - 'type': 'MANUAL', + 'type': 'HEATING', + 'vertical_swing': None, + }), + 'termination': dict({ + 'projected_expiry': None, + 'type': 'MANUAL', + 'type_skill_based_app': 'MANUAL', + }), + 'type': 'MANUAL', + }), + 'overlay_active': True, + 'overlay_termination_timestamp': None, + 'overlay_termination_type': 'MANUAL', + 'overlay_type': 'MANUAL', + 'power': 'ON', + 'precision': 0.1, + 'preparation': False, + 'sensor_data_points': dict({ + 'humidity': dict({ + 'percentage': 51.0, + 'timestamp': '2024-02-27T20:37:02.553Z', + 'type': 'PERCENTAGE', + }), + 'inside_temperature': dict({ + 'celsius': 17.98, + 'fahrenheit': 64.36, + 'precision': dict({ + 'celsius': 0.1, + 'fahrenheit': 0.1, }), - 'overlay_active': True, - 'overlay_termination_timestamp': None, - 'overlay_termination_type': 'MANUAL', - 'overlay_type': 'MANUAL', + 'timestamp': '2024-02-27T20:37:02.553Z', + 'type': 'TEMPERATURE', + }), + }), + 'setting': dict({ + 'fan_level': None, + 'fan_speed': None, + 'horizontal_swing': None, + 'mode': None, + 'power': 'ON', + 'swing': None, + 'temperature': dict({ + 'celsius': 17.0, + 'fahrenheit': 62.6, + 'timestamp': None, + 'type': None, + }), + 'type': 'HEATING', + 'vertical_swing': None, + }), + 'tado_mode': 'HOME', + 'target_temp': 17.0, + 'termination_condition': None, + }), + '2': dict({ + 'ac_power': None, + 'ac_power_timestamp': None, + 'activity_data_points': dict({ + 'ac_power': None, + 'heating_power': dict({ + 'percentage': 11.0, + 'timestamp': '2024-02-27T20:37:22.791Z', + 'type': 'PERCENTAGE', + 'value': None, + }), + }), + 'available': True, + 'connection': None, + 'current_fan_level': None, + 'current_fan_speed': None, + 'current_horizontal_swing_mode': None, + 'current_humidity': 56.9, + 'current_humidity_timestamp': '2024-02-27T20:38:14.791Z', + 'current_hvac_action': 'HEATING', + 'current_hvac_mode': 'HEAT', + 'current_swing_mode': None, + 'current_temp': 14.89, + 'current_temp_timestamp': '2024-02-27T20:38:14.791Z', + 'current_vertical_swing_mode': None, + 'default_overlay_termination_duration': None, + 'default_overlay_termination_type': None, + 'geolocation_override': False, + 'geolocation_override_disable_time': None, + 'heating_power': None, + 'heating_power_percentage': 11.0, + 'heating_power_timestamp': '2024-02-27T20:37:22.791Z', + 'is_away': False, + 'link': dict({ + 'state': 'ONLINE', + }), + 'next_schedule_change': None, + 'next_time_block': dict({ + 'start': '2024-02-27T21:00:00.000Z', + }), + 'open_window': None, + 'open_window_attr': None, + 'open_window_detected': False, + 'overlay': dict({ + 'projected_expiry': None, + 'setting': dict({ + 'fan_level': None, + 'fan_speed': None, + 'horizontal_swing': None, + 'mode': None, 'power': 'ON', - 'precision': 0.1, - 'preparation': False, - 'sensor_data_points': dict({ - 'humidity': dict({ - 'percentage': 55.5, - 'timestamp': '2024-02-27T20:37:12.297Z', - 'type': 'PERCENTAGE', - }), - 'inside_temperature': dict({ - 'celsius': 17.52, - 'fahrenheit': 63.54, - 'precision': dict({ - 'celsius': 0.1, - 'fahrenheit': 0.1, - }), - 'timestamp': '2024-02-27T20:37:12.297Z', - 'type': 'TEMPERATURE', - }), - }), - 'setting': dict({ - 'fan_level': None, - 'fan_speed': None, - 'horizontal_swing': None, - 'mode': None, - 'power': 'ON', - 'swing': None, - 'temperature': dict({ - 'celsius': 17.0, - 'fahrenheit': 62.6, - 'timestamp': None, - 'type': None, - }), - 'type': 'HEATING', - 'vertical_swing': None, + 'swing': None, + 'temperature': dict({ + 'celsius': 15.0, + 'fahrenheit': 59.0, + 'timestamp': None, + 'type': None, }), - 'tado_mode': 'HOME', - 'target_temp': 17.0, - 'termination_condition': None, - }), - '4': dict({ - 'ac_power': None, - 'ac_power_timestamp': None, - 'activity_data_points': dict({ - 'ac_power': None, - 'heating_power': dict({ - 'percentage': 0.0, - 'timestamp': '2024-02-27T20:27:18.903Z', - 'type': 'PERCENTAGE', - 'value': None, - }), + 'type': 'HEATING', + 'vertical_swing': None, + }), + 'termination': dict({ + 'projected_expiry': None, + 'type': 'MANUAL', + 'type_skill_based_app': 'MANUAL', + }), + 'type': 'MANUAL', + }), + 'overlay_active': True, + 'overlay_termination_timestamp': None, + 'overlay_termination_type': 'MANUAL', + 'overlay_type': 'MANUAL', + 'power': 'ON', + 'precision': 0.1, + 'preparation': False, + 'sensor_data_points': dict({ + 'humidity': dict({ + 'percentage': 56.9, + 'timestamp': '2024-02-27T20:38:14.791Z', + 'type': 'PERCENTAGE', + }), + 'inside_temperature': dict({ + 'celsius': 14.89, + 'fahrenheit': 58.8, + 'precision': dict({ + 'celsius': 0.1, + 'fahrenheit': 0.1, }), - 'available': True, - 'connection': None, - 'current_fan_level': None, - 'current_fan_speed': None, - 'current_horizontal_swing_mode': None, - 'current_humidity': 63.3, - 'current_humidity_timestamp': '2024-02-27T20:37:20.931Z', - 'current_hvac_action': 'OFF', - 'current_hvac_mode': 'OFF', - 'current_swing_mode': None, - 'current_temp': 18.57, - 'current_temp_timestamp': '2024-02-27T20:37:20.931Z', - 'current_vertical_swing_mode': None, - 'default_overlay_termination_duration': None, - 'default_overlay_termination_type': None, - 'geolocation_override': False, - 'geolocation_override_disable_time': None, - 'heating_power': None, - 'heating_power_percentage': 0.0, - 'heating_power_timestamp': '2024-02-27T20:27:18.903Z', - 'is_away': False, - 'link': dict({ - 'state': 'ONLINE', + 'timestamp': '2024-02-27T20:38:14.791Z', + 'type': 'TEMPERATURE', + }), + }), + 'setting': dict({ + 'fan_level': None, + 'fan_speed': None, + 'horizontal_swing': None, + 'mode': None, + 'power': 'ON', + 'swing': None, + 'temperature': dict({ + 'celsius': 15.0, + 'fahrenheit': 59.0, + 'timestamp': None, + 'type': None, + }), + 'type': 'HEATING', + 'vertical_swing': None, + }), + 'tado_mode': 'HOME', + 'target_temp': 15.0, + 'termination_condition': None, + }), + '3': dict({ + 'ac_power': None, + 'ac_power_timestamp': None, + 'activity_data_points': dict({ + 'ac_power': None, + 'heating_power': dict({ + 'percentage': 0.0, + 'timestamp': '2024-02-27T20:28:21.301Z', + 'type': 'PERCENTAGE', + 'value': None, + }), + }), + 'available': True, + 'connection': None, + 'current_fan_level': None, + 'current_fan_speed': None, + 'current_horizontal_swing_mode': None, + 'current_humidity': 55.5, + 'current_humidity_timestamp': '2024-02-27T20:37:12.297Z', + 'current_hvac_action': 'IDLE', + 'current_hvac_mode': 'HEAT', + 'current_swing_mode': None, + 'current_temp': 17.52, + 'current_temp_timestamp': '2024-02-27T20:37:12.297Z', + 'current_vertical_swing_mode': None, + 'default_overlay_termination_duration': None, + 'default_overlay_termination_type': None, + 'geolocation_override': False, + 'geolocation_override_disable_time': None, + 'heating_power': None, + 'heating_power_percentage': 0.0, + 'heating_power_timestamp': '2024-02-27T20:28:21.301Z', + 'is_away': False, + 'link': dict({ + 'state': 'ONLINE', + }), + 'next_schedule_change': dict({ + 'setting': dict({ + 'fan_level': None, + 'fan_speed': None, + 'horizontal_swing': None, + 'mode': None, + 'power': 'ON', + 'swing': None, + 'temperature': dict({ + 'celsius': 18.0, + 'fahrenheit': 64.4, + 'timestamp': None, + 'type': None, }), - 'next_schedule_change': dict({ - 'setting': dict({ - 'fan_level': None, - 'fan_speed': None, - 'horizontal_swing': None, - 'mode': None, - 'power': 'ON', - 'swing': None, - 'temperature': dict({ - 'celsius': 18.0, - 'fahrenheit': 64.4, - 'timestamp': None, - 'type': None, - }), - 'type': 'HEATING', - 'vertical_swing': None, - }), - 'start': '2024-02-27T21:00:00Z', + 'type': 'HEATING', + 'vertical_swing': None, + }), + 'start': '2024-02-27T21:00:00Z', + }), + 'next_time_block': dict({ + 'start': '2024-02-27T21:00:00.000Z', + }), + 'open_window': None, + 'open_window_attr': None, + 'open_window_detected': False, + 'overlay': dict({ + 'projected_expiry': None, + 'setting': dict({ + 'fan_level': None, + 'fan_speed': None, + 'horizontal_swing': None, + 'mode': None, + 'power': 'ON', + 'swing': None, + 'temperature': dict({ + 'celsius': 17.0, + 'fahrenheit': 62.6, + 'timestamp': None, + 'type': None, }), - 'next_time_block': dict({ - 'start': '2024-02-27T21:00:00.000Z', + 'type': 'HEATING', + 'vertical_swing': None, + }), + 'termination': dict({ + 'projected_expiry': None, + 'type': 'MANUAL', + 'type_skill_based_app': 'MANUAL', + }), + 'type': 'MANUAL', + }), + 'overlay_active': True, + 'overlay_termination_timestamp': None, + 'overlay_termination_type': 'MANUAL', + 'overlay_type': 'MANUAL', + 'power': 'ON', + 'precision': 0.1, + 'preparation': False, + 'sensor_data_points': dict({ + 'humidity': dict({ + 'percentage': 55.5, + 'timestamp': '2024-02-27T20:37:12.297Z', + 'type': 'PERCENTAGE', + }), + 'inside_temperature': dict({ + 'celsius': 17.52, + 'fahrenheit': 63.54, + 'precision': dict({ + 'celsius': 0.1, + 'fahrenheit': 0.1, }), - 'open_window': None, - 'open_window_attr': None, - 'open_window_detected': False, - 'overlay': dict({ - 'projected_expiry': None, - 'setting': dict({ - 'fan_level': None, - 'fan_speed': None, - 'horizontal_swing': None, - 'mode': None, - 'power': 'OFF', - 'swing': None, - 'temperature': None, - 'type': 'HEATING', - 'vertical_swing': None, - }), - 'termination': dict({ - 'projected_expiry': None, - 'type': 'MANUAL', - 'type_skill_based_app': 'MANUAL', - }), - 'type': 'MANUAL', + 'timestamp': '2024-02-27T20:37:12.297Z', + 'type': 'TEMPERATURE', + }), + }), + 'setting': dict({ + 'fan_level': None, + 'fan_speed': None, + 'horizontal_swing': None, + 'mode': None, + 'power': 'ON', + 'swing': None, + 'temperature': dict({ + 'celsius': 17.0, + 'fahrenheit': 62.6, + 'timestamp': None, + 'type': None, + }), + 'type': 'HEATING', + 'vertical_swing': None, + }), + 'tado_mode': 'HOME', + 'target_temp': 17.0, + 'termination_condition': None, + }), + '4': dict({ + 'ac_power': None, + 'ac_power_timestamp': None, + 'activity_data_points': dict({ + 'ac_power': None, + 'heating_power': dict({ + 'percentage': 0.0, + 'timestamp': '2024-02-27T20:27:18.903Z', + 'type': 'PERCENTAGE', + 'value': None, + }), + }), + 'available': True, + 'connection': None, + 'current_fan_level': None, + 'current_fan_speed': None, + 'current_horizontal_swing_mode': None, + 'current_humidity': 63.3, + 'current_humidity_timestamp': '2024-02-27T20:37:20.931Z', + 'current_hvac_action': 'OFF', + 'current_hvac_mode': 'OFF', + 'current_swing_mode': None, + 'current_temp': 18.57, + 'current_temp_timestamp': '2024-02-27T20:37:20.931Z', + 'current_vertical_swing_mode': None, + 'default_overlay_termination_duration': None, + 'default_overlay_termination_type': None, + 'geolocation_override': False, + 'geolocation_override_disable_time': None, + 'heating_power': None, + 'heating_power_percentage': 0.0, + 'heating_power_timestamp': '2024-02-27T20:27:18.903Z', + 'is_away': False, + 'link': dict({ + 'state': 'ONLINE', + }), + 'next_schedule_change': dict({ + 'setting': dict({ + 'fan_level': None, + 'fan_speed': None, + 'horizontal_swing': None, + 'mode': None, + 'power': 'ON', + 'swing': None, + 'temperature': dict({ + 'celsius': 18.0, + 'fahrenheit': 64.4, + 'timestamp': None, + 'type': None, }), - 'overlay_active': True, - 'overlay_termination_timestamp': None, - 'overlay_termination_type': 'MANUAL', - 'overlay_type': 'MANUAL', + 'type': 'HEATING', + 'vertical_swing': None, + }), + 'start': '2024-02-27T21:00:00Z', + }), + 'next_time_block': dict({ + 'start': '2024-02-27T21:00:00.000Z', + }), + 'open_window': None, + 'open_window_attr': None, + 'open_window_detected': False, + 'overlay': dict({ + 'projected_expiry': None, + 'setting': dict({ + 'fan_level': None, + 'fan_speed': None, + 'horizontal_swing': None, + 'mode': None, 'power': 'OFF', - 'precision': 0.1, - 'preparation': False, - 'sensor_data_points': dict({ - 'humidity': dict({ - 'percentage': 63.3, - 'timestamp': '2024-02-27T20:37:20.931Z', - 'type': 'PERCENTAGE', - }), - 'inside_temperature': dict({ - 'celsius': 18.57, - 'fahrenheit': 65.43, - 'precision': dict({ - 'celsius': 0.1, - 'fahrenheit': 0.1, - }), - 'timestamp': '2024-02-27T20:37:20.931Z', - 'type': 'TEMPERATURE', - }), - }), - 'setting': dict({ - 'fan_level': None, - 'fan_speed': None, - 'horizontal_swing': None, - 'mode': None, - 'power': 'OFF', - 'swing': None, - 'temperature': None, - 'type': 'HEATING', - 'vertical_swing': None, + 'swing': None, + 'temperature': None, + 'type': 'HEATING', + 'vertical_swing': None, + }), + 'termination': dict({ + 'projected_expiry': None, + 'type': 'MANUAL', + 'type_skill_based_app': 'MANUAL', + }), + 'type': 'MANUAL', + }), + 'overlay_active': True, + 'overlay_termination_timestamp': None, + 'overlay_termination_type': 'MANUAL', + 'overlay_type': 'MANUAL', + 'power': 'OFF', + 'precision': 0.1, + 'preparation': False, + 'sensor_data_points': dict({ + 'humidity': dict({ + 'percentage': 63.3, + 'timestamp': '2024-02-27T20:37:20.931Z', + 'type': 'PERCENTAGE', + }), + 'inside_temperature': dict({ + 'celsius': 18.57, + 'fahrenheit': 65.43, + 'precision': dict({ + 'celsius': 0.1, + 'fahrenheit': 0.1, }), - 'tado_mode': 'HOME', - 'target_temp': None, - 'termination_condition': None, + 'timestamp': '2024-02-27T20:37:20.931Z', + 'type': 'TEMPERATURE', }), }), + 'setting': dict({ + 'fan_level': None, + 'fan_speed': None, + 'horizontal_swing': None, + 'mode': None, + 'power': 'OFF', + 'swing': None, + 'temperature': None, + 'type': 'HEATING', + 'vertical_swing': None, + }), + 'tado_mode': 'HOME', + 'target_temp': None, + 'termination_condition': None, }), - ]) + }) # --- # name: test_get_zones list([