Make names of switch entities in gree consistent with docs (#141580)

This commit is contained in:
Norbert Rittel 2025-03-27 22:51:11 +01:00 committed by Franck Nijhof
parent e11409ef99
commit c490e350bc
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
3 changed files with 25 additions and 25 deletions

View File

@ -16,13 +16,13 @@
"name": "Panel light"
},
"quiet": {
"name": "Quiet"
"name": "Quiet mode"
},
"fresh_air": {
"name": "Fresh air"
},
"xfan": {
"name": "XFan"
"name": "Xtra fan"
},
"health_mode": {
"name": "Health mode"

View File

@ -16,10 +16,10 @@
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'switch',
'friendly_name': 'fake-device-1 Quiet',
'friendly_name': 'fake-device-1 Quiet mode',
}),
'context': <ANY>,
'entity_id': 'switch.fake_device_1_quiet',
'entity_id': 'switch.fake_device_1_quiet_mode',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
@ -40,10 +40,10 @@
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'switch',
'friendly_name': 'fake-device-1 XFan',
'friendly_name': 'fake-device-1 Xtra fan',
}),
'context': <ANY>,
'entity_id': 'switch.fake_device_1_xfan',
'entity_id': 'switch.fake_device_1_xtra_fan',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
@ -109,7 +109,7 @@
'disabled_by': None,
'domain': 'switch',
'entity_category': None,
'entity_id': 'switch.fake_device_1_quiet',
'entity_id': 'switch.fake_device_1_quiet_mode',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
@ -121,7 +121,7 @@
}),
'original_device_class': <SwitchDeviceClass.SWITCH: 'switch'>,
'original_icon': None,
'original_name': 'Quiet',
'original_name': 'Quiet mode',
'platform': 'gree',
'previous_unique_id': None,
'supported_features': 0,
@ -173,7 +173,7 @@
'disabled_by': None,
'domain': 'switch',
'entity_category': None,
'entity_id': 'switch.fake_device_1_xfan',
'entity_id': 'switch.fake_device_1_xtra_fan',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
@ -185,7 +185,7 @@
}),
'original_device_class': <SwitchDeviceClass.SWITCH: 'switch'>,
'original_icon': None,
'original_name': 'XFan',
'original_name': 'Xtra fan',
'platform': 'gree',
'previous_unique_id': None,
'supported_features': 0,

View File

@ -22,11 +22,11 @@ from homeassistant.setup import async_setup_component
from tests.common import MockConfigEntry
ENTITY_ID_LIGHT_PANEL = f"{SWITCH_DOMAIN}.fake_device_1_panel_light"
ENTITY_ID_PANEL_LIGHT = f"{SWITCH_DOMAIN}.fake_device_1_panel_light"
ENTITY_ID_HEALTH_MODE = f"{SWITCH_DOMAIN}.fake_device_1_health_mode"
ENTITY_ID_QUIET = f"{SWITCH_DOMAIN}.fake_device_1_quiet"
ENTITY_ID_QUIET_MODE = f"{SWITCH_DOMAIN}.fake_device_1_quiet_mode"
ENTITY_ID_FRESH_AIR = f"{SWITCH_DOMAIN}.fake_device_1_fresh_air"
ENTITY_ID_XFAN = f"{SWITCH_DOMAIN}.fake_device_1_xfan"
ENTITY_ID_XTRA_FAN = f"{SWITCH_DOMAIN}.fake_device_1_xtra_fan"
async def async_setup_gree(hass: HomeAssistant) -> MockConfigEntry:
@ -54,11 +54,11 @@ async def test_registry_settings(
@pytest.mark.parametrize(
"entity",
[
ENTITY_ID_LIGHT_PANEL,
ENTITY_ID_PANEL_LIGHT,
ENTITY_ID_HEALTH_MODE,
ENTITY_ID_QUIET,
ENTITY_ID_QUIET_MODE,
ENTITY_ID_FRESH_AIR,
ENTITY_ID_XFAN,
ENTITY_ID_XTRA_FAN,
],
)
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
@ -81,11 +81,11 @@ async def test_send_switch_on(hass: HomeAssistant, entity: str) -> None:
@pytest.mark.parametrize(
"entity",
[
ENTITY_ID_LIGHT_PANEL,
ENTITY_ID_PANEL_LIGHT,
ENTITY_ID_HEALTH_MODE,
ENTITY_ID_QUIET,
ENTITY_ID_QUIET_MODE,
ENTITY_ID_FRESH_AIR,
ENTITY_ID_XFAN,
ENTITY_ID_XTRA_FAN,
],
)
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
@ -112,11 +112,11 @@ async def test_send_switch_on_device_timeout(
@pytest.mark.parametrize(
"entity",
[
ENTITY_ID_LIGHT_PANEL,
ENTITY_ID_PANEL_LIGHT,
ENTITY_ID_HEALTH_MODE,
ENTITY_ID_QUIET,
ENTITY_ID_QUIET_MODE,
ENTITY_ID_FRESH_AIR,
ENTITY_ID_XFAN,
ENTITY_ID_XTRA_FAN,
],
)
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
@ -139,11 +139,11 @@ async def test_send_switch_off(hass: HomeAssistant, entity: str) -> None:
@pytest.mark.parametrize(
"entity",
[
ENTITY_ID_LIGHT_PANEL,
ENTITY_ID_PANEL_LIGHT,
ENTITY_ID_HEALTH_MODE,
ENTITY_ID_QUIET,
ENTITY_ID_QUIET_MODE,
ENTITY_ID_FRESH_AIR,
ENTITY_ID_XFAN,
ENTITY_ID_XTRA_FAN,
],
)
@pytest.mark.usefixtures("entity_registry_enabled_by_default")