From 75533463f794b935a28a4a08cb6d9b4dca798677 Mon Sep 17 00:00:00 2001 From: Dan Bishop Date: Tue, 25 Feb 2025 18:41:47 +0000 Subject: [PATCH] Make Radarr unit translation lowercase (#139261) Co-authored-by: Joost Lekkerkerker --- homeassistant/components/radarr/strings.json | 4 ++-- tests/components/radarr/test_sensor.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/radarr/strings.json b/homeassistant/components/radarr/strings.json index cb624aff057..268d7955c1b 100644 --- a/homeassistant/components/radarr/strings.json +++ b/homeassistant/components/radarr/strings.json @@ -44,11 +44,11 @@ "sensor": { "movies": { "name": "Movies", - "unit_of_measurement": "[%key:component::radarr::entity::sensor::movies::name%]" + "unit_of_measurement": "movies" }, "queue": { "name": "Queue", - "unit_of_measurement": "[%key:component::radarr::entity::sensor::movies::name%]" + "unit_of_measurement": "[%key:component::radarr::entity::sensor::movies::unit_of_measurement%]" }, "start_time": { "name": "Start time" diff --git a/tests/components/radarr/test_sensor.py b/tests/components/radarr/test_sensor.py index 9139e13a957..f6b14bffa80 100644 --- a/tests/components/radarr/test_sensor.py +++ b/tests/components/radarr/test_sensor.py @@ -68,13 +68,13 @@ async def test_sensors( assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == "GB" state = hass.states.get("sensor.mock_title_movies") assert state.state == "1" - assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == "Movies" + assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == "movies" state = hass.states.get("sensor.mock_title_start_time") assert state.state == "2020-09-01T23:50:20+00:00" assert state.attributes.get(ATTR_DEVICE_CLASS) == SensorDeviceClass.TIMESTAMP state = hass.states.get("sensor.mock_title_queue") assert state.state == "2" - assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == "Movies" + assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == "movies" assert state.attributes.get(ATTR_STATE_CLASS) is SensorStateClass.TOTAL