Add entity translations to Nexia (#98803)

This commit is contained in:
Joost Lekkerkerker 2023-08-22 14:41:15 +02:00 committed by GitHub
parent 09efd1c972
commit 097c7fbfef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 90 additions and 45 deletions

View file

@ -29,7 +29,7 @@ async def test_create_sensors(hass: HomeAssistant) -> None:
assert state.state == "Permanent Hold"
expected_attributes = {
"attribution": "Data provided by Trane Technologies",
"friendly_name": "Nick Office Zone Setpoint Status",
"friendly_name": "Nick Office Zone setpoint status",
}
# Only test for a subset of attributes in case
# HA changes the implementation and a new one appears
@ -42,7 +42,7 @@ async def test_create_sensors(hass: HomeAssistant) -> None:
expected_attributes = {
"attribution": "Data provided by Trane Technologies",
"friendly_name": "Nick Office Zone Status",
"friendly_name": "Nick Office Zone status",
}
# Only test for a subset of attributes in case
# HA changes the implementation and a new one appears
@ -55,7 +55,7 @@ async def test_create_sensors(hass: HomeAssistant) -> None:
expected_attributes = {
"attribution": "Data provided by Trane Technologies",
"friendly_name": "Master Suite Air Cleaner Mode",
"friendly_name": "Master Suite Air cleaner mode",
}
# Only test for a subset of attributes in case
# HA changes the implementation and a new one appears
@ -68,7 +68,7 @@ async def test_create_sensors(hass: HomeAssistant) -> None:
expected_attributes = {
"attribution": "Data provided by Trane Technologies",
"friendly_name": "Master Suite Current Compressor Speed",
"friendly_name": "Master Suite Current compressor speed",
"unit_of_measurement": PERCENTAGE,
}
# Only test for a subset of attributes in case
@ -83,7 +83,7 @@ async def test_create_sensors(hass: HomeAssistant) -> None:
expected_attributes = {
"attribution": "Data provided by Trane Technologies",
"device_class": "temperature",
"friendly_name": "Master Suite Outdoor Temperature",
"friendly_name": "Master Suite Outdoor temperature",
"unit_of_measurement": UnitOfTemperature.CELSIUS,
}
# Only test for a subset of attributes in case
@ -92,13 +92,13 @@ async def test_create_sensors(hass: HomeAssistant) -> None:
state.attributes[key] == expected_attributes[key] for key in expected_attributes
)
state = hass.states.get("sensor.master_suite_relative_humidity")
state = hass.states.get("sensor.master_suite_humidity")
assert state.state == "52.0"
expected_attributes = {
"attribution": "Data provided by Trane Technologies",
"device_class": "humidity",
"friendly_name": "Master Suite Relative Humidity",
"friendly_name": "Master Suite Humidity",
"unit_of_measurement": PERCENTAGE,
}
# Only test for a subset of attributes in case
@ -112,7 +112,7 @@ async def test_create_sensors(hass: HomeAssistant) -> None:
expected_attributes = {
"attribution": "Data provided by Trane Technologies",
"friendly_name": "Master Suite Requested Compressor Speed",
"friendly_name": "Master Suite Requested compressor speed",
"unit_of_measurement": PERCENTAGE,
}
# Only test for a subset of attributes in case
@ -126,7 +126,7 @@ async def test_create_sensors(hass: HomeAssistant) -> None:
expected_attributes = {
"attribution": "Data provided by Trane Technologies",
"friendly_name": "Master Suite System Status",
"friendly_name": "Master Suite System status",
}
# Only test for a subset of attributes in case
# HA changes the implementation and a new one appears