2017-10-14 18:06:44 +00:00
|
|
|
"""The tests for the uptime sensor platform."""
|
|
|
|
|
2020-10-13 20:18:31 +00:00
|
|
|
from homeassistant.setup import async_setup_component
|
2019-12-09 18:07:32 +00:00
|
|
|
|
2020-10-13 20:18:31 +00:00
|
|
|
|
|
|
|
async def test_uptime_sensor_name_change(hass):
|
|
|
|
"""Test uptime sensor with different name."""
|
|
|
|
config = {"sensor": {"platform": "uptime", "name": "foobar"}}
|
|
|
|
assert await async_setup_component(hass, "sensor", config)
|
|
|
|
await hass.async_block_till_done()
|
2020-12-01 16:28:59 +00:00
|
|
|
assert hass.states.get("sensor.foobar")
|