diff --git a/homeassistant/components/sensibo/diagnostics.py b/homeassistant/components/sensibo/diagnostics.py index 9d998e739f0e1d831632d392218a6ec37cebc12f..32ad07871a35df4d5618776e97817f8b7381a2a3 100644 --- a/homeassistant/components/sensibo/diagnostics.py +++ b/homeassistant/components/sensibo/diagnostics.py @@ -14,6 +14,7 @@ TO_REDACT = { "location", "ssid", "id", + "mac", "macAddress", "parentDeviceUid", "qrId", diff --git a/tests/components/sensibo/snapshots/test_diagnostics.ambr b/tests/components/sensibo/snapshots/test_diagnostics.ambr index b1cda16fb4dae51e59824ec7d5be7e324838ccd0..c911a7629be3f749596b6701426939b7eb384b49 100644 --- a/tests/components/sensibo/snapshots/test_diagnostics.ambr +++ b/tests/components/sensibo/snapshots/test_diagnostics.ambr @@ -240,3 +240,1432 @@ dict({ }) # --- +# name: test_diagnostics[full_snapshot] + dict({ + 'AAZZAAZZ': dict({ + 'ac_states': dict({ + 'fanLevel': 'low', + 'light': 'on', + 'mode': 'fan', + 'on': False, + 'timestamp': dict({ + 'secondsAgo': -1, + 'time': '2022-04-30T11:23:30.067312Z', + }), + }), + 'active_features': list([ + 'timestamp', + 'on', + 'mode', + 'fanLevel', + 'light', + ]), + 'anti_mold_enabled': None, + 'anti_mold_fan_time': None, + 'anti_mold_running': None, + 'auto_off': False, + 'auto_off_minutes': None, + 'available': True, + 'calibration_hum': 0.0, + 'calibration_temp': 0.0, + 'co2': None, + 'device_on': False, + 'etoh': None, + 'fan_mode': 'low', + 'fan_modes': list([ + 'low', + 'high', + ]), + 'fan_modes_translated': dict({ + 'high': 'high', + 'low': 'low', + }), + 'feelslike': None, + 'filter_clean': False, + 'filter_last_reset': '2022-04-23T15:58:45+00:00', + 'full_capabilities': dict({ + 'modes': dict({ + 'fan': dict({ + 'fanLevels': list([ + 'low', + 'high', + ]), + 'light': list([ + 'on', + 'dim', + 'off', + ]), + 'temperatures': dict({ + }), + }), + }), + }), + 'fw_type': 'pure-esp32', + 'fw_ver': 'PUR00111', + 'fw_ver_available': 'PUR00111', + 'horizontal_swing_mode': None, + 'horizontal_swing_modes': None, + 'horizontal_swing_modes_translated': None, + 'humidity': None, + 'hvac_mode': 'fan', + 'hvac_modes': list([ + 'fan', + 'off', + ]), + 'iaq': None, + 'id': '**REDACTED**', + 'light_mode': 'on', + 'light_modes': list([ + 'on', + 'dim', + 'off', + ]), + 'light_modes_translated': dict({ + 'dim': 'dim', + 'off': 'off', + 'on': 'on', + }), + 'location_id': 'ZZZZZZZZZZZZ', + 'location_name': 'Home', + 'mac': '**REDACTED**', + 'model': 'pure', + 'motion_sensors': dict({ + }), + 'name': 'Kitchen', + 'pm25': 1, + 'pure_ac_integration': False, + 'pure_boost_enabled': False, + 'pure_conf': dict({ + 'ac_integration': False, + 'enabled': False, + 'geo_integration': False, + 'measurements_integration': True, + 'prime_integration': False, + 'sensitivity': 'N', + }), + 'pure_geo_integration': False, + 'pure_measure_integration': True, + 'pure_prime_integration': False, + 'pure_sensitivity': 'n', + 'rcda': None, + 'room_occupied': None, + 'schedules': dict({ + }), + 'serial': '**REDACTED**', + 'smart_high_state': dict({ + }), + 'smart_high_temp_threshold': None, + 'smart_low_state': dict({ + }), + 'smart_low_temp_threshold': None, + 'smart_on': None, + 'smart_type': None, + 'state': 'fan', + 'swing_mode': None, + 'swing_modes': None, + 'swing_modes_translated': None, + 'target_temp': None, + 'temp': None, + 'temp_list': list([ + 0, + 1, + ]), + 'temp_step': 1, + 'temp_unit': 'C', + 'timer_id': None, + 'timer_on': None, + 'timer_state_on': None, + 'timer_time': None, + 'tvoc': None, + 'update_available': False, + }), + 'ABC999111': dict({ + 'ac_states': dict({ + 'fanLevel': 'high', + 'horizontalSwing': 'stopped', + 'light': 'on', + 'mode': 'heat', + 'on': True, + 'swing': 'stopped', + 'targetTemperature': 25, + 'timestamp': dict({ + 'secondsAgo': -1, + 'time': '2022-04-30T11:23:30.019722Z', + }), + }), + 'active_features': list([ + 'timestamp', + 'on', + 'mode', + 'fanLevel', + 'targetTemperature', + 'swing', + 'horizontalSwing', + 'light', + ]), + 'anti_mold_enabled': None, + 'anti_mold_fan_time': None, + 'anti_mold_running': None, + 'auto_off': False, + 'auto_off_minutes': None, + 'available': True, + 'calibration_hum': 0.0, + 'calibration_temp': 0.1, + 'co2': None, + 'device_on': True, + 'etoh': None, + 'fan_mode': 'high', + 'fan_modes': list([ + 'quiet', + 'low', + 'medium', + ]), + 'fan_modes_translated': dict({ + 'low': 'low', + 'medium': 'medium', + 'quiet': 'quiet', + }), + 'feelslike': 21.2, + 'filter_clean': True, + 'filter_last_reset': '2022-03-12T15:24:26+00:00', + 'full_capabilities': dict({ + 'modes': dict({ + 'auto': dict({ + 'fanLevels': list([ + 'quiet', + 'low', + 'medium', + ]), + 'horizontalSwing': list([ + 'stopped', + 'fixedLeft', + 'fixedCenterLeft', + ]), + 'light': list([ + 'on', + 'off', + ]), + 'swing': list([ + 'stopped', + 'fixedTop', + 'fixedMiddleTop', + ]), + 'temperatures': dict({ + 'C': dict({ + 'isNative': True, + 'values': list([ + 10, + 16, + 17, + 18, + 19, + 20, + ]), + }), + 'F': dict({ + 'isNative': False, + 'values': list([ + 64, + 66, + 68, + ]), + }), + }), + }), + 'cool': dict({ + 'fanLevels': list([ + 'quiet', + 'low', + 'medium', + ]), + 'horizontalSwing': list([ + 'stopped', + 'fixedLeft', + 'fixedCenterLeft', + ]), + 'light': list([ + 'on', + 'off', + ]), + 'swing': list([ + 'stopped', + 'fixedTop', + 'fixedMiddleTop', + ]), + 'temperatures': dict({ + 'C': dict({ + 'isNative': True, + 'values': list([ + 10, + 16, + 17, + 18, + 19, + 20, + ]), + }), + 'F': dict({ + 'isNative': False, + 'values': list([ + 64, + 66, + 68, + ]), + }), + }), + }), + 'dry': dict({ + 'horizontalSwing': list([ + 'stopped', + 'fixedLeft', + 'fixedCenterLeft', + ]), + 'light': list([ + 'on', + 'off', + ]), + 'swing': list([ + 'stopped', + 'fixedTop', + 'fixedMiddleTop', + ]), + 'temperatures': dict({ + 'C': dict({ + 'isNative': True, + 'values': list([ + 10, + 16, + 17, + 18, + 19, + 20, + ]), + }), + 'F': dict({ + 'isNative': False, + 'values': list([ + 64, + 66, + 68, + ]), + }), + }), + }), + 'fan': dict({ + 'fanLevels': list([ + 'quiet', + 'low', + 'medium', + ]), + 'horizontalSwing': list([ + 'stopped', + 'fixedLeft', + 'fixedCenterLeft', + ]), + 'light': list([ + 'on', + 'off', + ]), + 'swing': list([ + 'stopped', + 'fixedTop', + 'fixedMiddleTop', + ]), + 'temperatures': dict({ + }), + }), + 'heat': dict({ + 'fanLevels': list([ + 'quiet', + 'low', + 'medium', + ]), + 'horizontalSwing': list([ + 'stopped', + 'fixedLeft', + 'fixedCenterLeft', + ]), + 'light': list([ + 'on', + 'off', + ]), + 'swing': list([ + 'stopped', + 'fixedTop', + 'fixedMiddleTop', + ]), + 'temperatures': dict({ + 'C': dict({ + 'isNative': True, + 'values': list([ + 10, + 16, + 17, + 18, + 19, + 20, + ]), + }), + 'F': dict({ + 'isNative': False, + 'values': list([ + 63, + 64, + 66, + ]), + }), + }), + }), + }), + }), + 'fw_type': 'esp8266ex', + 'fw_ver': 'SKY30046', + 'fw_ver_available': 'SKY30048', + 'horizontal_swing_mode': 'stopped', + 'horizontal_swing_modes': list([ + 'stopped', + 'fixedleft', + 'fixedcenterleft', + ]), + 'horizontal_swing_modes_translated': dict({ + 'fixedcenterleft': 'fixedCenterLeft', + 'fixedleft': 'fixedLeft', + 'stopped': 'stopped', + }), + 'humidity': 32.9, + 'hvac_mode': 'heat', + 'hvac_modes': list([ + 'cool', + 'heat', + 'dry', + 'auto', + 'fan', + 'off', + ]), + 'iaq': None, + 'id': '**REDACTED**', + 'light_mode': 'on', + 'light_modes': list([ + 'on', + 'off', + ]), + 'light_modes_translated': dict({ + 'off': 'off', + 'on': 'on', + }), + 'location_id': 'ZZZZZZZZZZZZ', + 'location_name': 'Home', + 'mac': '**REDACTED**', + 'model': 'skyv2', + 'motion_sensors': dict({ + 'AABBCC': dict({ + '__type': "<class 'pysensibo.model.MotionSensor'>", + 'repr': "MotionSensor(id='AABBCC', alive=True, motion=True, fw_ver='V17', fw_type='nrf52', is_main_sensor=True, battery_voltage=3000, humidity=57, temperature=23.9, model='motion_sensor', rssi=-72)", + }), + }), + 'name': 'Hallway', + 'pm25': None, + 'pure_ac_integration': None, + 'pure_boost_enabled': None, + 'pure_conf': dict({ + }), + 'pure_geo_integration': None, + 'pure_measure_integration': None, + 'pure_prime_integration': None, + 'pure_sensitivity': None, + 'rcda': None, + 'room_occupied': True, + 'schedules': dict({ + '11': dict({ + '__type': "<class 'pysensibo.model.Schedules'>", + 'repr': "Schedules(id='11', enabled=False, name=None, state_on=False, state_full={'on': False, 'targettemperature': 21, 'temperatureunit': 'c', 'mode': 'heat', 'fanlevel': 'low', 'swing': 'stopped', 'extra': {'scheduler': {'climate_react': None, 'motion': None, 'on': False, 'climate_react_settings': None, 'pure_boost': None}}, 'horizontalswing': 'stopped', 'light': 'on'}, days=['wednesday', 'thursday'], time='17:40', next_utc=datetime.datetime(2022, 5, 4, 15, 40, tzinfo=datetime.timezone.utc))", + }), + }), + 'serial': '**REDACTED**', + 'smart_high_state': dict({ + 'fanlevel': 'high', + 'horizontalswing': 'stopped', + 'light': 'on', + 'mode': 'cool', + 'on': True, + 'swing': 'stopped', + 'targettemperature': 21, + 'temperatureunit': 'c', + }), + 'smart_high_temp_threshold': 27.5, + 'smart_low_state': dict({ + 'fanlevel': 'low', + 'horizontalswing': 'stopped', + 'light': 'on', + 'mode': 'heat', + 'on': True, + 'swing': 'stopped', + 'targettemperature': 21, + 'temperatureunit': 'c', + }), + 'smart_low_temp_threshold': 0.0, + 'smart_on': False, + 'smart_type': 'temperature', + 'state': 'heat', + 'swing_mode': 'stopped', + 'swing_modes': list([ + 'stopped', + 'fixedtop', + 'fixedmiddletop', + ]), + 'swing_modes_translated': dict({ + 'fixedmiddletop': 'fixedMiddleTop', + 'fixedtop': 'fixedTop', + 'stopped': 'stopped', + }), + 'target_temp': 25, + 'temp': 21.2, + 'temp_list': list([ + 10, + 16, + 17, + 18, + 19, + 20, + ]), + 'temp_step': 1, + 'temp_unit': 'C', + 'timer_id': None, + 'timer_on': False, + 'timer_state_on': None, + 'timer_time': None, + 'tvoc': None, + 'update_available': True, + }), + 'BBZZBBZZ': dict({ + 'ac_states': dict({ + 'on': False, + 'timestamp': dict({ + 'secondsAgo': -1, + 'time': '2022-04-30T11:23:30.067312Z', + }), + }), + 'active_features': list([ + 'timestamp', + 'on', + ]), + 'anti_mold_enabled': None, + 'anti_mold_fan_time': None, + 'anti_mold_running': None, + 'auto_off': False, + 'auto_off_minutes': None, + 'available': True, + 'calibration_hum': 0.0, + 'calibration_temp': 0.0, + 'co2': None, + 'device_on': False, + 'etoh': None, + 'fan_mode': None, + 'fan_modes': None, + 'fan_modes_translated': None, + 'feelslike': None, + 'filter_clean': False, + 'filter_last_reset': '2022-04-23T15:58:45+00:00', + 'full_capabilities': dict({ + }), + 'fw_type': 'pure-esp32', + 'fw_ver': 'PUR00111', + 'fw_ver_available': 'PUR00111', + 'horizontal_swing_mode': None, + 'horizontal_swing_modes': None, + 'horizontal_swing_modes_translated': None, + 'humidity': None, + 'hvac_mode': None, + 'hvac_modes': list([ + 'off', + ]), + 'iaq': None, + 'id': '**REDACTED**', + 'light_mode': None, + 'light_modes': None, + 'light_modes_translated': None, + 'location_id': 'ZZZZZZZZZZYY', + 'location_name': 'Home', + 'mac': '**REDACTED**', + 'model': 'pure', + 'motion_sensors': dict({ + }), + 'name': 'Bedroom', + 'pm25': 1, + 'pure_ac_integration': False, + 'pure_boost_enabled': False, + 'pure_conf': dict({ + }), + 'pure_geo_integration': False, + 'pure_measure_integration': False, + 'pure_prime_integration': False, + 'pure_sensitivity': 'n', + 'rcda': None, + 'room_occupied': None, + 'schedules': dict({ + }), + 'serial': '**REDACTED**', + 'smart_high_state': dict({ + }), + 'smart_high_temp_threshold': None, + 'smart_low_state': dict({ + }), + 'smart_low_temp_threshold': None, + 'smart_on': None, + 'smart_type': None, + 'state': 'off', + 'swing_mode': None, + 'swing_modes': None, + 'swing_modes_translated': None, + 'target_temp': None, + 'temp': None, + 'temp_list': list([ + 0, + 1, + ]), + 'temp_step': 1, + 'temp_unit': 'C', + 'timer_id': None, + 'timer_on': None, + 'timer_state_on': None, + 'timer_time': None, + 'tvoc': None, + 'update_available': False, + }), + 'raw': dict({ + 'result': list([ + dict({ + 'acState': dict({ + 'fanLevel': 'high', + 'horizontalSwing': 'stopped', + 'light': 'on', + 'mode': 'heat', + 'on': True, + 'swing': 'stopped', + 'targetTemperature': 25, + 'timestamp': dict({ + 'secondsAgo': -1, + 'time': '2022-04-30T11:23:30.019722Z', + }), + }), + 'accessPoint': dict({ + 'password': None, + 'ssid': '**REDACTED**', + }), + 'antiMoldConfig': None, + 'antiMoldTimer': None, + 'autoOffEnabled': False, + 'autoOffMinutes': None, + 'cleanFiltersNotificationEnabled': False, + 'configGroup': 'stable', + 'connectionStatus': dict({ + 'isAlive': True, + 'lastSeen': dict({ + 'secondsAgo': 32, + 'time': '2022-04-30T11:22:57.894846Z', + }), + }), + 'currentlyAvailableFirmwareVersion': 'SKY30048', + 'features': list([ + 'softShowPlus', + 'optimusTrial', + ]), + 'filtersCleaning': dict({ + 'acOnSecondsSinceLastFiltersClean': 667991, + 'filtersCleanSecondsThreshold': 1080000, + 'lastFiltersCleanTime': dict({ + 'secondsAgo': 4219143, + 'time': '2022-03-12T15:24:26Z', + }), + 'shouldCleanFilters': True, + }), + 'firmwareType': 'esp8266ex', + 'firmwareVersion': 'SKY30046', + 'homekitSupported': False, + 'id': '**REDACTED**', + 'isClimateReactGeofenceOnEnterEnabledForThisUser': False, + 'isClimateReactGeofenceOnExitEnabled': False, + 'isGeofenceOnEnterEnabledForThisUser': False, + 'isGeofenceOnExitEnabled': False, + 'isMotionGeofenceOnEnterEnabled': False, + 'isMotionGeofenceOnExitEnabled': False, + 'isOwner': True, + 'lastACStateChange': dict({ + 'acState': dict({ + 'fanLevel': 'high', + 'horizontalSwing': 'stopped', + 'light': 'on', + 'mode': 'fan', + 'on': False, + 'swing': 'stopped', + 'timestamp': dict({ + 'secondsAgo': -1, + 'time': '2022-04-30T11:23:30.062645Z', + }), + }), + 'causedByScheduleId': None, + 'causedByScheduleType': None, + 'changedProperties': list([ + 'on', + ]), + 'failureReason': None, + 'id': '**REDACTED**', + 'reason': 'UserRequest', + 'resolveTime': dict({ + 'secondsAgo': 119, + 'time': '2022-04-30T11:21:30Z', + }), + 'resultingAcState': dict({ + 'fanLevel': 'high', + 'horizontalSwing': 'stopped', + 'light': 'on', + 'mode': 'fan', + 'on': False, + 'swing': 'stopped', + 'timestamp': dict({ + 'secondsAgo': -1, + 'time': '2022-04-30T11:23:30.062688Z', + }), + }), + 'status': 'Success', + 'time': dict({ + 'secondsAgo': 120, + 'time': '2022-04-30T11:21:29Z', + }), + }), + 'lastHealthcheck': None, + 'lastStateChange': dict({ + 'secondsAgo': 119, + 'time': '2022-04-30T11:21:30Z', + }), + 'lastStateChangeToOff': dict({ + 'secondsAgo': 119, + 'time': '2022-04-30T11:21:30Z', + }), + 'lastStateChangeToOn': dict({ + 'secondsAgo': 181, + 'time': '2022-04-30T11:20:28Z', + }), + 'location': '**REDACTED**', + 'macAddress': '**REDACTED**', + 'mainMeasurementsSensor': dict({ + 'configGroup': 'stable', + 'connectionStatus': dict({ + 'isAlive': True, + 'lastSeen': dict({ + 'secondsAgo': 86, + 'time': '2022-01-01T18:59:48.665878Z', + }), + }), + 'firmwareType': 'nrf52', + 'firmwareVersion': 'V17', + 'id': '**REDACTED**', + 'isMainSensor': True, + 'macAddress': '**REDACTED**', + 'measurements': dict({ + 'batteryVoltage': 3000, + 'humidity': 32.9, + 'motion': False, + 'rssi': -72, + 'temperature': 21.2, + 'time': dict({ + 'secondsAgo': 86, + 'time': '2022-01-01T18:59:48.665878Z', + }), + }), + 'parentDeviceUid': '**REDACTED**', + 'productModel': 'motion_sensor', + 'qrId': '**REDACTED**', + 'serial': '**REDACTED**', + }), + 'measurements': dict({ + 'feelsLike': 21.2, + 'humidity': 32.9, + 'motion': True, + 'roomIsOccupied': True, + 'rssi': -45, + 'temperature': 21.2, + 'time': dict({ + 'secondsAgo': 32, + 'time': '2022-04-30T11:22:57.894846Z', + }), + }), + 'motionConfig': dict({ + 'enabled': True, + 'onEnterACChange': False, + 'onEnterACState': None, + 'onEnterCRChange': True, + 'onExitACChange': True, + 'onExitACState': None, + 'onExitCRChange': True, + 'onExitDelayMinutes': 20, + }), + 'motionSensors': list([ + dict({ + 'configGroup': 'stable', + 'connectionStatus': dict({ + 'isAlive': True, + 'lastSeen': dict({ + 'secondsAgo': 86, + 'time': '2022-01-01T18:59:48.665878Z', + }), + }), + 'firmwareType': 'nrf52', + 'firmwareVersion': 'V17', + 'id': '**REDACTED**', + 'isMainSensor': True, + 'macAddress': '**REDACTED**', + 'measurements': dict({ + 'batteryVoltage': 3000, + 'humidity': 57, + 'motion': True, + 'rssi': -72, + 'temperature': 23.9, + 'time': dict({ + 'secondsAgo': 86, + 'time': '2022-01-01T18:59:48.665878Z', + }), + }), + 'parentDeviceUid': '**REDACTED**', + 'productModel': 'motion_sensor', + 'qrId': '**REDACTED**', + 'serial': '**REDACTED**', + }), + ]), + 'productModel': 'skyv2', + 'pureBoostConfig': None, + 'qrId': '**REDACTED**', + 'remote': dict({ + 'toggle': False, + 'window': False, + }), + 'remoteAlternatives': list([ + '_mitsubishi2_night_heat', + ]), + 'remoteCapabilities': dict({ + 'modes': dict({ + 'auto': dict({ + 'fanLevels': list([ + 'quiet', + 'low', + 'medium', + ]), + 'horizontalSwing': list([ + 'stopped', + 'fixedLeft', + 'fixedCenterLeft', + ]), + 'light': list([ + 'on', + 'off', + ]), + 'swing': list([ + 'stopped', + 'fixedTop', + 'fixedMiddleTop', + ]), + 'temperatures': dict({ + 'C': dict({ + 'isNative': True, + 'values': list([ + 10, + 16, + 17, + 18, + 19, + 20, + ]), + }), + 'F': dict({ + 'isNative': False, + 'values': list([ + 64, + 66, + 68, + ]), + }), + }), + }), + 'cool': dict({ + 'fanLevels': list([ + 'quiet', + 'low', + 'medium', + ]), + 'horizontalSwing': list([ + 'stopped', + 'fixedLeft', + 'fixedCenterLeft', + ]), + 'light': list([ + 'on', + 'off', + ]), + 'swing': list([ + 'stopped', + 'fixedTop', + 'fixedMiddleTop', + ]), + 'temperatures': dict({ + 'C': dict({ + 'isNative': True, + 'values': list([ + 10, + 16, + 17, + 18, + 19, + 20, + ]), + }), + 'F': dict({ + 'isNative': False, + 'values': list([ + 64, + 66, + 68, + ]), + }), + }), + }), + 'dry': dict({ + 'horizontalSwing': list([ + 'stopped', + 'fixedLeft', + 'fixedCenterLeft', + ]), + 'light': list([ + 'on', + 'off', + ]), + 'swing': list([ + 'stopped', + 'fixedTop', + 'fixedMiddleTop', + ]), + 'temperatures': dict({ + 'C': dict({ + 'isNative': True, + 'values': list([ + 10, + 16, + 17, + 18, + 19, + 20, + ]), + }), + 'F': dict({ + 'isNative': False, + 'values': list([ + 64, + 66, + 68, + ]), + }), + }), + }), + 'fan': dict({ + 'fanLevels': list([ + 'quiet', + 'low', + 'medium', + ]), + 'horizontalSwing': list([ + 'stopped', + 'fixedLeft', + 'fixedCenterLeft', + ]), + 'light': list([ + 'on', + 'off', + ]), + 'swing': list([ + 'stopped', + 'fixedTop', + 'fixedMiddleTop', + ]), + 'temperatures': dict({ + }), + }), + 'heat': dict({ + 'fanLevels': list([ + 'quiet', + 'low', + 'medium', + ]), + 'horizontalSwing': list([ + 'stopped', + 'fixedLeft', + 'fixedCenterLeft', + ]), + 'light': list([ + 'on', + 'off', + ]), + 'swing': list([ + 'stopped', + 'fixedTop', + 'fixedMiddleTop', + ]), + 'temperatures': dict({ + 'C': dict({ + 'isNative': True, + 'values': list([ + 10, + 16, + 17, + 18, + 19, + 20, + ]), + }), + 'F': dict({ + 'isNative': False, + 'values': list([ + 63, + 64, + 66, + ]), + }), + }), + }), + }), + }), + 'remoteFlavor': 'Curious Sea Cucumber', + 'room': dict({ + 'icon': 'Lounge', + 'name': 'Hallway', + 'uid': '**REDACTED**', + }), + 'roomIsOccupied': True, + 'runningHealthcheck': None, + 'schedules': list([ + dict({ + 'acState': dict({ + 'extra': dict({ + 'scheduler': dict({ + 'climate_react': None, + 'climate_react_settings': None, + 'motion': None, + 'on': False, + 'pure_boost': None, + }), + }), + 'fanLevel': 'low', + 'horizontalSwing': 'stopped', + 'light': 'on', + 'mode': 'heat', + 'on': False, + 'swing': 'stopped', + 'targetTemperature': 21, + 'temperatureUnit': 'C', + }), + 'createTime': '2022-04-17T15:41:05', + 'createTimeSecondsAgo': 1107745, + 'id': '**REDACTED**', + 'isEnabled': False, + 'name': None, + 'nextTime': '2022-05-04T15:40:00', + 'nextTimeSecondsFromNow': 360989, + 'podUid': '**REDACTED**', + 'recurringDays': list([ + 'Wednesday', + 'Thursday', + ]), + 'targetTimeLocal': '17:40', + 'timezone': 'Europe/Stockholm', + }), + ]), + 'sensorsCalibration': dict({ + 'humidity': 0.0, + 'temperature': 0.1, + }), + 'serial': '**REDACTED**', + 'serviceSubscriptions': list([ + ]), + 'shouldShowFilterCleaningNotification': False, + 'smartMode': dict({ + 'deviceUid': '**REDACTED**', + 'enabled': False, + 'highTemperatureState': dict({ + 'fanLevel': 'high', + 'horizontalSwing': 'stopped', + 'light': 'on', + 'mode': 'cool', + 'on': True, + 'swing': 'stopped', + 'targetTemperature': 21, + 'temperatureUnit': 'C', + }), + 'highTemperatureThreshold': 27.5, + 'highTemperatureWebhook': None, + 'lowTemperatureState': dict({ + 'fanLevel': 'low', + 'horizontalSwing': 'stopped', + 'light': 'on', + 'mode': 'heat', + 'on': True, + 'swing': 'stopped', + 'targetTemperature': 21, + 'temperatureUnit': 'C', + }), + 'lowTemperatureThreshold': 0.0, + 'lowTemperatureWebhook': None, + 'type': 'temperature', + }), + 'tags': list([ + ]), + 'temperatureUnit': 'C', + 'timer': None, + 'warrantyEligible': 'no', + 'warrantyEligibleUntil': dict({ + 'secondsAgo': 64093221, + 'time': '2020-04-18T15:43:08Z', + }), + }), + dict({ + 'acState': dict({ + 'fanLevel': 'low', + 'light': 'on', + 'mode': 'fan', + 'on': False, + 'timestamp': dict({ + 'secondsAgo': -1, + 'time': '2022-04-30T11:23:30.067312Z', + }), + }), + 'accessPoint': dict({ + 'password': None, + 'ssid': '**REDACTED**', + }), + 'antiMoldConfig': None, + 'antiMoldTimer': None, + 'autoOffEnabled': False, + 'autoOffMinutes': None, + 'cleanFiltersNotificationEnabled': False, + 'configGroup': 'stable', + 'connectionStatus': dict({ + 'isAlive': True, + 'lastSeen': dict({ + 'secondsAgo': 9, + 'time': '2022-04-30T11:23:20.642798Z', + }), + }), + 'currentlyAvailableFirmwareVersion': 'PUR00111', + 'features': list([ + 'optimusTrial', + 'softShowPlus', + ]), + 'filtersCleaning': dict({ + 'acOnSecondsSinceLastFiltersClean': 415560, + 'filtersCleanSecondsThreshold': 14256000, + 'lastFiltersCleanTime': dict({ + 'secondsAgo': 588284, + 'time': '2022-04-23T15:58:45Z', + }), + 'shouldCleanFilters': False, + }), + 'firmwareType': 'pure-esp32', + 'firmwareVersion': 'PUR00111', + 'homekitSupported': True, + 'id': '**REDACTED**', + 'isClimateReactGeofenceOnEnterEnabledForThisUser': False, + 'isClimateReactGeofenceOnExitEnabled': False, + 'isGeofenceOnEnterEnabledForThisUser': False, + 'isGeofenceOnExitEnabled': False, + 'isMotionGeofenceOnEnterEnabled': False, + 'isMotionGeofenceOnExitEnabled': False, + 'isOwner': True, + 'lastACStateChange': dict({ + 'acState': dict({ + 'fanLevel': 'low', + 'light': 'on', + 'mode': 'fan', + 'on': False, + 'timestamp': dict({ + 'secondsAgo': -1, + 'time': '2022-04-30T11:23:30.090144Z', + }), + }), + 'causedByScheduleId': None, + 'causedByScheduleType': None, + 'changedProperties': list([ + 'on', + ]), + 'failureReason': None, + 'id': '**REDACTED**', + 'reason': 'UserRequest', + 'resolveTime': dict({ + 'secondsAgo': 112, + 'time': '2022-04-30T11:21:37Z', + }), + 'resultingAcState': dict({ + 'fanLevel': 'low', + 'light': 'on', + 'mode': 'fan', + 'on': False, + 'timestamp': dict({ + 'secondsAgo': -1, + 'time': '2022-04-30T11:23:30.090185Z', + }), + }), + 'status': 'Success', + 'time': dict({ + 'secondsAgo': 112, + 'time': '2022-04-30T11:21:37Z', + }), + }), + 'lastHealthcheck': None, + 'lastStateChange': dict({ + 'secondsAgo': 108, + 'time': '2022-04-30T11:21:41Z', + }), + 'lastStateChangeToOff': dict({ + 'secondsAgo': 112, + 'time': '2022-04-30T11:21:37Z', + }), + 'lastStateChangeToOn': dict({ + 'secondsAgo': 6003, + 'time': '2022-04-30T09:43:26Z', + }), + 'location': '**REDACTED**', + 'macAddress': '**REDACTED**', + 'mainMeasurementsSensor': None, + 'measurements': dict({ + 'motion': False, + 'pm25': 1, + 'roomIsOccupied': None, + 'rssi': -58, + 'time': dict({ + 'secondsAgo': 9, + 'time': '2022-04-30T11:23:20.642798Z', + }), + }), + 'motionConfig': None, + 'motionSensors': list([ + ]), + 'productModel': 'pure', + 'pureBoostConfig': dict({ + 'ac_integration': False, + 'enabled': False, + 'geo_integration': False, + 'measurements_integration': True, + 'prime_integration': False, + 'sensitivity': 'N', + }), + 'qrId': '**REDACTED**', + 'remote': dict({ + 'toggle': False, + 'window': False, + }), + 'remoteAlternatives': list([ + ]), + 'remoteCapabilities': dict({ + 'modes': dict({ + 'fan': dict({ + 'fanLevels': list([ + 'low', + 'high', + ]), + 'light': list([ + 'on', + 'dim', + 'off', + ]), + 'temperatures': dict({ + }), + }), + }), + }), + 'remoteFlavor': 'Eccentric Eagle', + 'room': dict({ + 'icon': 'Diningroom', + 'name': 'Kitchen', + 'uid': '**REDACTED**', + }), + 'roomIsOccupied': None, + 'runningHealthcheck': None, + 'schedules': list([ + ]), + 'sensorsCalibration': dict({ + 'humidity': 0.0, + 'temperature': 0.0, + }), + 'serial': '**REDACTED**', + 'serviceSubscriptions': list([ + ]), + 'shouldShowFilterCleaningNotification': False, + 'smartMode': None, + 'tags': list([ + ]), + 'temperatureUnit': 'C', + 'timer': None, + 'warrantyEligible': 'no', + 'warrantyEligibleUntil': dict({ + 'secondsAgo': 1733071, + 'time': '2022-04-10T09:58:58Z', + }), + }), + dict({ + 'acState': dict({ + 'on': False, + 'timestamp': dict({ + 'secondsAgo': -1, + 'time': '2022-04-30T11:23:30.067312Z', + }), + }), + 'accessPoint': dict({ + 'password': None, + 'ssid': '**REDACTED**', + }), + 'antiMoldConfig': None, + 'antiMoldTimer': None, + 'autoOffEnabled': False, + 'autoOffMinutes': None, + 'cleanFiltersNotificationEnabled': False, + 'configGroup': 'stable', + 'connectionStatus': dict({ + 'isAlive': True, + 'lastSeen': dict({ + 'secondsAgo': 9, + 'time': '2022-04-30T11:23:20.642798Z', + }), + }), + 'currentlyAvailableFirmwareVersion': 'PUR00111', + 'features': list([ + 'optimusTrial', + 'softShowPlus', + ]), + 'filtersCleaning': dict({ + 'acOnSecondsSinceLastFiltersClean': 415560, + 'filtersCleanSecondsThreshold': 14256000, + 'lastFiltersCleanTime': dict({ + 'secondsAgo': 588284, + 'time': '2022-04-23T15:58:45Z', + }), + 'shouldCleanFilters': False, + }), + 'firmwareType': 'pure-esp32', + 'firmwareVersion': 'PUR00111', + 'homekitSupported': True, + 'id': '**REDACTED**', + 'isClimateReactGeofenceOnEnterEnabledForThisUser': False, + 'isClimateReactGeofenceOnExitEnabled': False, + 'isGeofenceOnEnterEnabledForThisUser': False, + 'isGeofenceOnExitEnabled': False, + 'isMotionGeofenceOnEnterEnabled': False, + 'isMotionGeofenceOnExitEnabled': False, + 'isOwner': True, + 'lastACStateChange': dict({ + 'acState': dict({ + 'fanLevel': 'low', + 'light': 'on', + 'mode': 'fan', + 'on': False, + 'timestamp': dict({ + 'secondsAgo': -1, + 'time': '2022-04-30T11:23:30.090144Z', + }), + }), + 'causedByScheduleId': None, + 'causedByScheduleType': None, + 'changedProperties': list([ + 'on', + ]), + 'failureReason': None, + 'id': '**REDACTED**', + 'reason': 'UserRequest', + 'resolveTime': dict({ + 'secondsAgo': 112, + 'time': '2022-04-30T11:21:37Z', + }), + 'resultingAcState': dict({ + 'fanLevel': 'low', + 'light': 'on', + 'mode': 'fan', + 'on': False, + 'timestamp': dict({ + 'secondsAgo': -1, + 'time': '2022-04-30T11:23:30.090185Z', + }), + }), + 'status': 'Success', + 'time': dict({ + 'secondsAgo': 112, + 'time': '2022-04-30T11:21:37Z', + }), + }), + 'lastHealthcheck': None, + 'lastStateChange': dict({ + 'secondsAgo': 108, + 'time': '2022-04-30T11:21:41Z', + }), + 'lastStateChangeToOff': dict({ + 'secondsAgo': 112, + 'time': '2022-04-30T11:21:37Z', + }), + 'lastStateChangeToOn': dict({ + 'secondsAgo': 6003, + 'time': '2022-04-30T09:43:26Z', + }), + 'location': '**REDACTED**', + 'macAddress': '**REDACTED**', + 'mainMeasurementsSensor': None, + 'measurements': dict({ + 'motion': False, + 'pm25': 1, + 'roomIsOccupied': None, + 'rssi': -58, + 'time': dict({ + 'secondsAgo': 9, + 'time': '2022-04-30T11:23:20.642798Z', + }), + }), + 'motionConfig': None, + 'motionSensors': list([ + ]), + 'productModel': 'pure', + 'pureBoostConfig': None, + 'qrId': '**REDACTED**', + 'remote': dict({ + 'toggle': False, + 'window': False, + }), + 'remoteAlternatives': list([ + ]), + 'remoteCapabilities': None, + 'remoteFlavor': 'Eccentric Eagle', + 'room': dict({ + 'icon': 'Diningroom', + 'name': 'Bedroom', + 'uid': '**REDACTED**', + }), + 'roomIsOccupied': None, + 'runningHealthcheck': None, + 'schedules': list([ + ]), + 'sensorsCalibration': dict({ + 'humidity': 0.0, + 'temperature': 0.0, + }), + 'serial': '**REDACTED**', + 'serviceSubscriptions': list([ + ]), + 'shouldShowFilterCleaningNotification': False, + 'smartMode': None, + 'tags': list([ + ]), + 'temperatureUnit': 'C', + 'timer': None, + 'warrantyEligible': 'no', + 'warrantyEligibleUntil': dict({ + 'secondsAgo': 1733071, + 'time': '2022-04-10T09:58:58Z', + }), + }), + ]), + 'status': 'success', + }), + }) +# --- diff --git a/tests/components/sensibo/test_diagnostics.py b/tests/components/sensibo/test_diagnostics.py index bc35b7fdd578528bdc3f78804a79a1c6d1738ba3..320125e640395dfa651119c41f7ceb0e577756d4 100644 --- a/tests/components/sensibo/test_diagnostics.py +++ b/tests/components/sensibo/test_diagnostics.py @@ -9,6 +9,8 @@ from homeassistant.core import HomeAssistant from tests.components.diagnostics import get_diagnostics_for_config_entry from tests.typing import ClientSessionGenerator +EXCLUDE_ATTRIBUTES = {"full_features"} + async def test_diagnostics( hass: HomeAssistant, @@ -28,3 +30,9 @@ async def test_diagnostics( assert diag["ABC999111"]["smart_low_state"] == snapshot assert diag["ABC999111"]["smart_high_state"] == snapshot assert diag["ABC999111"]["pure_conf"] == snapshot + + def limit_attrs(prop, path): + exclude_attrs = EXCLUDE_ATTRIBUTES + return prop in exclude_attrs + + assert diag == snapshot(name="full_snapshot", exclude=limit_attrs)