Store runtime data in entry in Withings (#116439)
* Add entry runtime data to Withings * Store runtime data in entry in Withings * Fix * Fix * Update homeassistant/components/withings/coordinator.py Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com> --------- Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
This commit is contained in:
parent
ad84ff18eb
commit
6f406603a6
6 changed files with 31 additions and 30 deletions
|
@ -8,12 +8,12 @@ from homeassistant.components.binary_sensor import (
|
|||
BinarySensorDeviceClass,
|
||||
BinarySensorEntity,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import Platform
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
import homeassistant.helpers.entity_registry as er
|
||||
|
||||
from . import WithingsConfigEntry
|
||||
from .const import DOMAIN
|
||||
from .coordinator import WithingsBedPresenceDataUpdateCoordinator
|
||||
from .entity import WithingsEntity
|
||||
|
@ -21,11 +21,11 @@ from .entity import WithingsEntity
|
|||
|
||||
async def async_setup_entry(
|
||||
hass: HomeAssistant,
|
||||
entry: ConfigEntry,
|
||||
entry: WithingsConfigEntry,
|
||||
async_add_entities: AddEntitiesCallback,
|
||||
) -> None:
|
||||
"""Set up the sensor config entry."""
|
||||
coordinator = hass.data[DOMAIN][entry.entry_id].bed_presence_coordinator
|
||||
coordinator = entry.runtime_data.bed_presence_coordinator
|
||||
|
||||
ent_reg = er.async_get(hass)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue