Refactor switch for vesync #234745
Annotations
10 errors
Run pytest:
tests/components/vesync/test_diagnostics.py#L92
test_async_get_device_diagnostics__single_fan
AssertionError: assert [+ received] == [- snapshot]
......
...
}),
+ dict({
+ 'device_class': None,
+ 'disabled': False,
+ 'disabled_by': None,
+ 'domain': 'switch',
+ 'entity_category': None,
+ 'entity_id': 'switch.fan_on',
+ 'icon': None,
+ 'name': None,
+ 'original_device_class': None,
+ 'original_icon': None,
+ 'original_name': 'On',
+ 'state': dict({
+ 'attributes': dict({
+ 'friendly_name': 'Fan On',
+ }),
+ 'entity_id': 'switch.fan_on',
+ 'last_changed': '2025-01-15T15:49:26.517967+00:00',
+ 'last_reported': '2025-01-15T15:49:26.519825+00:00',
+ 'last_updated': '2025-01-15T15:49:26.517967+00:00',
+ 'state': 'unavailable',
+ }),
+ 'unit_of_measurement': None,
+ }),
]),
...
})
|
Run pytest:
tests/components/vesync/test_platform.py#L66
test_entity_update
AttributeError: 'NoneType' object has no attribute 'state'
|
Run pytest:
tests/components/vesync/test_switch.py#L47
test_switch_state[Humidifier 200s]
AssertionError: assert [+ received] == [- snapshot]
list([
+ EntityRegistryEntrySnapshot({
+ 'aliases': set({
+ }),
+ 'area_id': None,
+ 'capabilities': None,
+ 'config_entry_id': <ANY>,
+ 'device_class': None,
+ 'device_id': <ANY>,
+ 'disabled_by': None,
+ 'domain': 'switch',
+ 'entity_category': None,
+ 'entity_id': 'switch.humidifier_200s_on',
+ 'has_entity_name': True,
+ 'hidden_by': None,
+ 'icon': None,
+ 'id': <ANY>,
+ 'labels': set({
+ }),
+ 'name': None,
+ 'options': dict({
+ }),
+ 'original_device_class': None,
+ 'original_icon': None,
+ 'original_name': 'On',
+ 'platform': 'vesync',
+ 'previous_unique_id': None,
+ 'supported_features': 0,
+ 'translation_key': 'on',
+ 'unique_id': '200s-humidifier',
+ 'unit_of_measurement': None,
+ }),
])
|
Run pytest:
tests/components/vesync/test_switch.py#L47
test_switch_state[Humidifier 600S]
AssertionError: assert [+ received] == [- snapshot]
list([
+ EntityRegistryEntrySnapshot({
+ 'aliases': set({
+ }),
+ 'area_id': None,
+ 'capabilities': None,
+ 'config_entry_id': <ANY>,
+ 'device_class': None,
+ 'device_id': <ANY>,
+ 'disabled_by': None,
+ 'domain': 'switch',
+ 'entity_category': None,
+ 'entity_id': 'switch.humidifier_600s_on',
+ 'has_entity_name': True,
+ 'hidden_by': None,
+ 'icon': None,
+ 'id': <ANY>,
+ 'labels': set({
+ }),
+ 'name': None,
+ 'options': dict({
+ }),
+ 'original_device_class': None,
+ 'original_icon': None,
+ 'original_name': 'On',
+ 'platform': 'vesync',
+ 'previous_unique_id': None,
+ 'supported_features': 0,
+ 'translation_key': 'on',
+ 'unique_id': '600s-humidifier',
+ 'unit_of_measurement': None,
+ }),
])
|
Run pytest:
tests/components/vesync/test_switch.py#L47
test_switch_state[Air Purifier 131s]
AssertionError: assert [+ received] == [- snapshot]
list([
+ EntityRegistryEntrySnapshot({
+ 'aliases': set({
+ }),
+ 'area_id': None,
+ 'capabilities': None,
+ 'config_entry_id': <ANY>,
+ 'device_class': None,
+ 'device_id': <ANY>,
+ 'disabled_by': None,
+ 'domain': 'switch',
+ 'entity_category': None,
+ 'entity_id': 'switch.air_purifier_131s_on',
+ 'has_entity_name': True,
+ 'hidden_by': None,
+ 'icon': None,
+ 'id': <ANY>,
+ 'labels': set({
+ }),
+ 'name': None,
+ 'options': dict({
+ }),
+ 'original_device_class': None,
+ 'original_icon': None,
+ 'original_name': 'On',
+ 'platform': 'vesync',
+ 'previous_unique_id': None,
+ 'supported_features': 0,
+ 'translation_key': 'on',
+ 'unique_id': 'air-purifier',
+ 'unit_of_measurement': None,
+ }),
])
|
Run pytest:
tests/components/vesync/test_switch.py#L47
test_switch_state[Air Purifier 200s]
AssertionError: assert [+ received] == [- snapshot]
list([
+ EntityRegistryEntrySnapshot({
+ 'aliases': set({
+ }),
+ 'area_id': None,
+ 'capabilities': None,
+ 'config_entry_id': <ANY>,
+ 'device_class': None,
+ 'device_id': <ANY>,
+ 'disabled_by': None,
+ 'domain': 'switch',
+ 'entity_category': None,
+ 'entity_id': 'switch.air_purifier_200s_on',
+ 'has_entity_name': True,
+ 'hidden_by': None,
+ 'icon': None,
+ 'id': <ANY>,
+ 'labels': set({
+ }),
+ 'name': None,
+ 'options': dict({
+ }),
+ 'original_device_class': None,
+ 'original_icon': None,
+ 'original_name': 'On',
+ 'platform': 'vesync',
+ 'previous_unique_id': None,
+ 'supported_features': 0,
+ 'translation_key': 'on',
+ 'unique_id': 'asd_sdfKIHG7IJHGwJGJ7GJ_ag5h3G55',
+ 'unit_of_measurement': None,
+ }),
])
|
Run pytest:
tests/components/vesync/test_switch.py#L47
test_switch_state[Air Purifier 400s]
AssertionError: assert [+ received] == [- snapshot]
list([
+ EntityRegistryEntrySnapshot({
+ 'aliases': set({
+ }),
+ 'area_id': None,
+ 'capabilities': None,
+ 'config_entry_id': <ANY>,
+ 'device_class': None,
+ 'device_id': <ANY>,
+ 'disabled_by': None,
+ 'domain': 'switch',
+ 'entity_category': None,
+ 'entity_id': 'switch.air_purifier_400s_on',
+ 'has_entity_name': True,
+ 'hidden_by': None,
+ 'icon': None,
+ 'id': <ANY>,
+ 'labels': set({
+ }),
+ 'name': None,
+ 'options': dict({
+ }),
+ 'original_device_class': None,
+ 'original_icon': None,
+ 'original_name': 'On',
+ 'platform': 'vesync',
+ 'previous_unique_id': None,
+ 'supported_features': 0,
+ 'translation_key': 'on',
+ 'unique_id': '400s-purifier',
+ 'unit_of_measurement': None,
+ }),
])
|
Run pytest:
tests/components/vesync/test_switch.py#L47
test_switch_state[Air Purifier 600s]
AssertionError: assert [+ received] == [- snapshot]
list([
+ EntityRegistryEntrySnapshot({
+ 'aliases': set({
+ }),
+ 'area_id': None,
+ 'capabilities': None,
+ 'config_entry_id': <ANY>,
+ 'device_class': None,
+ 'device_id': <ANY>,
+ 'disabled_by': None,
+ 'domain': 'switch',
+ 'entity_category': None,
+ 'entity_id': 'switch.air_purifier_600s_on',
+ 'has_entity_name': True,
+ 'hidden_by': None,
+ 'icon': None,
+ 'id': <ANY>,
+ 'labels': set({
+ }),
+ 'name': None,
+ 'options': dict({
+ }),
+ 'original_device_class': None,
+ 'original_icon': None,
+ 'original_name': 'On',
+ 'platform': 'vesync',
+ 'previous_unique_id': None,
+ 'supported_features': 0,
+ 'translation_key': 'on',
+ 'unique_id': '600s-purifier',
+ 'unit_of_measurement': None,
+ }),
])
|
Run pytest:
tests/components/vesync/test_switch.py#L47
test_switch_state[Temperature Light]
AssertionError: assert [+ received] == [- snapshot]
list([
+ EntityRegistryEntrySnapshot({
+ 'aliases': set({
+ }),
+ 'area_id': None,
+ 'capabilities': None,
+ 'config_entry_id': <ANY>,
+ 'device_class': None,
+ 'device_id': <ANY>,
+ 'disabled_by': None,
+ 'domain': 'switch',
+ 'entity_category': None,
+ 'entity_id': 'switch.temperature_light_on',
+ 'has_entity_name': True,
+ 'hidden_by': None,
+ 'icon': None,
+ 'id': <ANY>,
+ 'labels': set({
+ }),
+ 'name': None,
+ 'options': dict({
+ }),
+ 'original_device_class': None,
+ 'original_icon': None,
+ 'original_name': 'On',
+ 'platform': 'vesync',
+ 'previous_unique_id': None,
+ 'supported_features': 0,
+ 'translation_key': 'on',
+ 'unique_id': 'tunable-bulb',
+ 'unit_of_measurement': None,
+ }),
])
|
Run pytest:
tests/components/vesync/test_switch.py#L47
test_switch_state[Outlet]
AssertionError: assert [+ received] == [- snapshot]
list([
...
'entity_category': None,
- 'entity_id': 'switch.outlet',
+ 'entity_id': 'switch.outlet_on',
'has_entity_name': True,
...
'original_icon': None,
- 'original_name': None,
+ 'original_name': 'On',
'platform': 'vesync',
...
])
|
Loading