Support cloudhooks in Withings (#100916)
* Support cloudhooks in Withings * Support cloudhooks in Withings * Support cloudhooks in Withings * Remove strings
This commit is contained in:
parent
42b006a108
commit
0f95de997f
15 changed files with 421 additions and 189 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue