mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 03:37:07 +00:00
Make Radarr unit translation lowercase (#139261)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
parent
2cd496fdaf
commit
75533463f7
@ -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"
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user