Support cloudhooks in Withings (#100916)

* Support cloudhooks in Withings

* Support cloudhooks in Withings

* Support cloudhooks in Withings

* Remove strings
This commit is contained in:
Joost Lekkerkerker 2023-09-26 21:52:18 +02:00 committed by GitHub
parent 42b006a108
commit 0f95de997f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 421 additions and 189 deletions

View file

@ -47,12 +47,11 @@ async def async_setup_entry(
"""Set up the sensor config entry."""
coordinator: WithingsDataUpdateCoordinator = hass.data[DOMAIN][entry.entry_id]
if coordinator.use_webhooks:
entities = [
WithingsBinarySensor(coordinator, attribute) for attribute in BINARY_SENSORS
]
entities = [
WithingsBinarySensor(coordinator, attribute) for attribute in BINARY_SENSORS
]
async_add_entities(entities)
async_add_entities(entities)
class WithingsBinarySensor(WithingsEntity, BinarySensorEntity):