Fix some homekit_controller pylint warnings and (local only) test failures (#76122)

This commit is contained in:
Jc2k 2022-08-04 11:30:37 +01:00 committed by GitHub
parent b7b965c9c9
commit d5695a2d86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 51 additions and 21 deletions

View file

@ -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):