Make Radarr unit translation lowercase (#139261)

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
Dan Bishop 2025-02-25 18:41:47 +00:00 committed by GitHub
parent 2cd496fdaf
commit 75533463f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -44,11 +44,11 @@
"sensor": { "sensor": {
"movies": { "movies": {
"name": "Movies", "name": "Movies",
"unit_of_measurement": "[%key:component::radarr::entity::sensor::movies::name%]" "unit_of_measurement": "movies"
}, },
"queue": { "queue": {
"name": "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": { "start_time": {
"name": "Start time" "name": "Start time"

View File

@ -68,13 +68,13 @@ async def test_sensors(
assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == "GB" assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == "GB"
state = hass.states.get("sensor.mock_title_movies") state = hass.states.get("sensor.mock_title_movies")
assert state.state == "1" 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") state = hass.states.get("sensor.mock_title_start_time")
assert state.state == "2020-09-01T23:50:20+00:00" assert state.state == "2020-09-01T23:50:20+00:00"
assert state.attributes.get(ATTR_DEVICE_CLASS) == SensorDeviceClass.TIMESTAMP assert state.attributes.get(ATTR_DEVICE_CLASS) == SensorDeviceClass.TIMESTAMP
state = hass.states.get("sensor.mock_title_queue") state = hass.states.get("sensor.mock_title_queue")
assert state.state == "2" 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 assert state.attributes.get(ATTR_STATE_CLASS) is SensorStateClass.TOTAL