Fix some homekit_controller pylint warnings and (local only) test failures (#76122)
This commit is contained in:
parent
b7b965c9c9
commit
d5695a2d86
3 changed files with 51 additions and 21 deletions
|
@ -92,10 +92,12 @@ async def test_temperature_sensor_not_added_twice(hass, utcnow):
|
|||
hass, create_temperature_sensor_service, suffix="temperature"
|
||||
)
|
||||
|
||||
created_sensors = set()
|
||||
for state in hass.states.async_all():
|
||||
if state.entity_id.startswith("button"):
|
||||
continue
|
||||
assert state.entity_id == helper.entity_id
|
||||
if state.attributes.get("device_class") == SensorDeviceClass.TEMPERATURE:
|
||||
created_sensors.add(state.entity_id)
|
||||
|
||||
assert created_sensors == {helper.entity_id}
|
||||
|
||||
|
||||
async def test_humidity_sensor_read_state(hass, utcnow):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue