2017-10-14 14:06:44 -04:00
|
|
|
"""The tests for the uptime sensor platform."""
|
|
|
|
|
2020-10-13 13:18:31 -07:00
|
|
|
from homeassistant.setup import async_setup_component
|
2019-12-09 19:07:32 +01:00
|
|
|
|
2020-10-13 13:18:31 -07: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 17:28:59 +01:00
|
|
|
assert hass.states.get("sensor.foobar")
|