Bumb python-homewizard-energy to 4.1.0 (#104121)

Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
Duco Sebel 2023-11-17 13:01:44 +01:00 committed by GitHub
parent b58af167a2
commit 97d38dae09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 176 additions and 21 deletions

View file

@ -7,6 +7,6 @@
"iot_class": "local_polling",
"loggers": ["homewizard_energy"],
"quality_scale": "platinum",
"requirements": ["python-homewizard-energy==4.0.0"],
"requirements": ["python-homewizard-energy==4.1.0"],
"zeroconf": ["_hwenergy._tcp.local."]
}

View file

@ -2143,7 +2143,7 @@ python-gc100==1.0.3a0
python-gitlab==1.6.0
# homeassistant.components.homewizard
python-homewizard-energy==4.0.0
python-homewizard-energy==4.1.0
# homeassistant.components.hp_ilo
python-hpilo==4.3

View file

@ -1600,7 +1600,7 @@ python-ecobee-api==0.2.17
python-fullykiosk==0.0.12
# homeassistant.components.homewizard
python-homewizard-energy==4.0.0
python-homewizard-energy==4.1.0
# homeassistant.components.izone
python-izone==1.2.9

View file

@ -265,7 +265,9 @@
'serial': '**REDACTED**',
}),
'state': None,
'system': None,
'system': dict({
'cloud_enabled': True,
}),
}),
'entry': dict({
'ip_address': '**REDACTED**',
@ -332,7 +334,9 @@
'serial': '**REDACTED**',
}),
'state': None,
'system': None,
'system': dict({
'cloud_enabled': True,
}),
}),
'entry': dict({
'ip_address': '**REDACTED**',

View file

@ -1,5 +1,5 @@
# serializer version: 1
# name: test_switch_entities[switch.device-state_set-power_on-HWE-SKT]
# name: test_switch_entities[HWE-SKT-switch.device-state_set-power_on]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'outlet',
@ -12,7 +12,7 @@
'state': 'on',
})
# ---
# name: test_switch_entities[switch.device-state_set-power_on-HWE-SKT].1
# name: test_switch_entities[HWE-SKT-switch.device-state_set-power_on].1
EntityRegistryEntrySnapshot({
'aliases': set({
}),
@ -43,7 +43,7 @@
'unit_of_measurement': None,
})
# ---
# name: test_switch_entities[switch.device-state_set-power_on-HWE-SKT].2
# name: test_switch_entities[HWE-SKT-switch.device-state_set-power_on].2
DeviceRegistryEntrySnapshot({
'area_id': None,
'config_entries': <ANY>,
@ -75,7 +75,7 @@
'via_device_id': None,
})
# ---
# name: test_switch_entities[switch.device_cloud_connection-system_set-cloud_enabled-HWE-SKT]
# name: test_switch_entities[HWE-SKT-switch.device_cloud_connection-system_set-cloud_enabled]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Device Cloud connection',
@ -88,7 +88,7 @@
'state': 'on',
})
# ---
# name: test_switch_entities[switch.device_cloud_connection-system_set-cloud_enabled-HWE-SKT].1
# name: test_switch_entities[HWE-SKT-switch.device_cloud_connection-system_set-cloud_enabled].1
EntityRegistryEntrySnapshot({
'aliases': set({
}),
@ -119,7 +119,7 @@
'unit_of_measurement': None,
})
# ---
# name: test_switch_entities[switch.device_cloud_connection-system_set-cloud_enabled-HWE-SKT].2
# name: test_switch_entities[HWE-SKT-switch.device_cloud_connection-system_set-cloud_enabled].2
DeviceRegistryEntrySnapshot({
'area_id': None,
'config_entries': <ANY>,
@ -151,7 +151,7 @@
'via_device_id': None,
})
# ---
# name: test_switch_entities[switch.device_switch_lock-state_set-switch_lock-HWE-SKT]
# name: test_switch_entities[HWE-SKT-switch.device_switch_lock-state_set-switch_lock]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Device Switch lock',
@ -164,7 +164,7 @@
'state': 'off',
})
# ---
# name: test_switch_entities[switch.device_switch_lock-state_set-switch_lock-HWE-SKT].1
# name: test_switch_entities[HWE-SKT-switch.device_switch_lock-state_set-switch_lock].1
EntityRegistryEntrySnapshot({
'aliases': set({
}),
@ -195,7 +195,7 @@
'unit_of_measurement': None,
})
# ---
# name: test_switch_entities[switch.device_switch_lock-state_set-switch_lock-HWE-SKT].2
# name: test_switch_entities[HWE-SKT-switch.device_switch_lock-state_set-switch_lock].2
DeviceRegistryEntrySnapshot({
'area_id': None,
'config_entries': <ANY>,
@ -227,3 +227,155 @@
'via_device_id': None,
})
# ---
# name: test_switch_entities[SDM230-switch.device_cloud_connection-system_set-cloud_enabled]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Device Cloud connection',
'icon': 'mdi:cloud',
}),
'context': <ANY>,
'entity_id': 'switch.device_cloud_connection',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_switch_entities[SDM230-switch.device_cloud_connection-system_set-cloud_enabled].1
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': <EntityCategory.CONFIG: 'config'>,
'entity_id': 'switch.device_cloud_connection',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': 'mdi:cloud',
'original_name': 'Cloud connection',
'platform': 'homewizard',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'cloud_connection',
'unique_id': 'aabbccddeeff_cloud_connection',
'unit_of_measurement': None,
})
# ---
# name: test_switch_entities[SDM230-switch.device_cloud_connection-system_set-cloud_enabled].2
DeviceRegistryEntrySnapshot({
'area_id': None,
'config_entries': <ANY>,
'configuration_url': None,
'connections': set({
tuple(
'mac',
'3c:39:e7:aa:bb:cc',
),
}),
'disabled_by': None,
'entry_type': None,
'hw_version': None,
'id': <ANY>,
'identifiers': set({
tuple(
'homewizard',
'3c39e7aabbcc',
),
}),
'is_new': False,
'manufacturer': 'HomeWizard',
'model': 'SDM230-wifi',
'name': 'Device',
'name_by_user': None,
'serial_number': None,
'suggested_area': None,
'sw_version': '3.06',
'via_device_id': None,
})
# ---
# name: test_switch_entities[SDM630-switch.device_cloud_connection-system_set-cloud_enabled]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Device Cloud connection',
'icon': 'mdi:cloud',
}),
'context': <ANY>,
'entity_id': 'switch.device_cloud_connection',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_switch_entities[SDM630-switch.device_cloud_connection-system_set-cloud_enabled].1
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': <EntityCategory.CONFIG: 'config'>,
'entity_id': 'switch.device_cloud_connection',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_icon': 'mdi:cloud',
'original_name': 'Cloud connection',
'platform': 'homewizard',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'cloud_connection',
'unique_id': 'aabbccddeeff_cloud_connection',
'unit_of_measurement': None,
})
# ---
# name: test_switch_entities[SDM630-switch.device_cloud_connection-system_set-cloud_enabled].2
DeviceRegistryEntrySnapshot({
'area_id': None,
'config_entries': <ANY>,
'configuration_url': None,
'connections': set({
tuple(
'mac',
'3c:39:e7:aa:bb:cc',
),
}),
'disabled_by': None,
'entry_type': None,
'hw_version': None,
'id': <ANY>,
'identifiers': set({
tuple(
'homewizard',
'3c39e7aabbcc',
),
}),
'is_new': False,
'manufacturer': 'HomeWizard',
'model': 'SDM630-wifi',
'name': 'Device',
'name_by_user': None,
'serial_number': None,
'suggested_area': None,
'sw_version': '3.06',
'via_device_id': None,
})
# ---

View file

@ -42,7 +42,6 @@ pytestmark = [
[
"switch.device",
"switch.device_switch_lock",
"switch.device_cloud_connection",
],
),
(
@ -50,7 +49,6 @@ pytestmark = [
[
"switch.device",
"switch.device_switch_lock",
"switch.device_cloud_connection",
],
),
],
@ -64,13 +62,14 @@ async def test_entities_not_created_for_device(
assert not hass.states.get(entity_id)
@pytest.mark.parametrize("device_fixture", ["HWE-SKT"])
@pytest.mark.parametrize(
("entity_id", "method", "parameter"),
("device_fixture", "entity_id", "method", "parameter"),
[
("switch.device", "state_set", "power_on"),
("switch.device_switch_lock", "state_set", "switch_lock"),
("switch.device_cloud_connection", "system_set", "cloud_enabled"),
("HWE-SKT", "switch.device", "state_set", "power_on"),
("HWE-SKT", "switch.device_switch_lock", "state_set", "switch_lock"),
("HWE-SKT", "switch.device_cloud_connection", "system_set", "cloud_enabled"),
("SDM230", "switch.device_cloud_connection", "system_set", "cloud_enabled"),
("SDM630", "switch.device_cloud_connection", "system_set", "cloud_enabled"),
],
)
async def test_switch_entities(