Name sensors correctly (#23208)

* Hue motion senors are motion sensors, not presence sensors.

* Name the sensors 'motion' instead of 'presence' - match the HA paradigm.
pull/23279/head
Richard Mitchell 2019-04-19 19:01:54 +01:00 committed by Jason Hu
parent e7054e0fd2
commit c899e2a662
2 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@ from homeassistant.components.hue.sensor_base import (
GenericZLLSensor, async_setup_entry as shared_async_setup_entry)
PRESENCE_NAME_FORMAT = "{} presence"
PRESENCE_NAME_FORMAT = "{} motion"
async def async_setup_entry(hass, config_entry, async_add_entities):

View File

@ -391,7 +391,7 @@ async def test_sensors(hass, mock_bridge):
assert len(hass.states.async_all()) == 6
presence_sensor_1 = hass.states.get(
'binary_sensor.living_room_sensor_presence')
'binary_sensor.living_room_sensor_motion')
light_level_sensor_1 = hass.states.get(
'sensor.living_room_sensor_light_level')
temperature_sensor_1 = hass.states.get(
@ -406,7 +406,7 @@ async def test_sensors(hass, mock_bridge):
assert temperature_sensor_1.name == 'Living room sensor temperature'
presence_sensor_2 = hass.states.get(
'binary_sensor.kitchen_sensor_presence')
'binary_sensor.kitchen_sensor_motion')
light_level_sensor_2 = hass.states.get(
'sensor.kitchen_sensor_light_level')
temperature_sensor_2 = hass.states.get(
@ -459,7 +459,7 @@ async def test_new_sensor_discovered(hass, mock_bridge):
assert len(mock_bridge.mock_requests) == 2
assert len(hass.states.async_all()) == 9
presence = hass.states.get('binary_sensor.bedroom_sensor_presence')
presence = hass.states.get('binary_sensor.bedroom_sensor_motion')
assert presence is not None
assert presence.state == 'on'
temperature = hass.states.get('sensor.bedroom_sensor_temperature')