Perform some Notion code cleanup (#58863)

This commit is contained in:
Aaron Bach 2021-11-14 11:08:35 -07:00 committed by GitHub
parent 5694250445
commit 595184aa55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 20 deletions

View file

@ -10,7 +10,7 @@ from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import NotionEntity
from .const import DATA_COORDINATOR, DOMAIN, LOGGER, SENSOR_TEMPERATURE
from .const import DOMAIN, LOGGER, SENSOR_TEMPERATURE
SENSOR_DESCRIPTIONS = (
SensorEntityDescription(
@ -27,7 +27,7 @@ async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
) -> None:
"""Set up Notion sensors based on a config entry."""
coordinator = hass.data[DOMAIN][entry.entry_id][DATA_COORDINATOR]
coordinator = hass.data[DOMAIN][entry.entry_id]
async_add_entities(
[