diff --git a/custom_components/redfin/config_flow.py b/custom_components/redfin/config_flow.py index e156d9c..6153575 100644 --- a/custom_components/redfin/config_flow.py +++ b/custom_components/redfin/config_flow.py @@ -111,7 +111,7 @@ async def async_step_init( errors: Dict[str, str] = {} # Grab all configured propert id's from the entity registry so we can populate the # multi-select dropdown that will allow a user to remove a property. - entity_registry = await async_get(self.hass) + entity_registry = sync_get(self.hass) entries = async_entries_for_config_entry( entity_registry, self.config_entry.entry_id ) diff --git a/custom_components/redfin/const.py b/custom_components/redfin/const.py index e7a978c..cae951b 100644 --- a/custom_components/redfin/const.py +++ b/custom_components/redfin/const.py @@ -21,3 +21,4 @@ CONF_SCAN_INTERVAL_MAX = 600 ICON = "mdi:home-variant" +STATE_CLASS_MEASUREMENT = "measurement" diff --git a/custom_components/redfin/sensor.py b/custom_components/redfin/sensor.py index d2b1dab..7b0c71d 100644 --- a/custom_components/redfin/sensor.py +++ b/custom_components/redfin/sensor.py @@ -8,7 +8,7 @@ from .const import (DEFAULT_NAME, DOMAIN, CONF_PROPERTIES, ATTRIBUTION, DEFAULT_SCAN_INTERVAL, CONF_PROPERTY_IDS, ICON, CONF_PROPERTY_ID, ATTR_AMOUNT, ATTR_AMOUNT_FORMATTED, ATTR_ADDRESS, ATTR_FULL_ADDRESS, - ATTR_CURRENCY, ATTR_STREET_VIEW, ATTR_REDFIN_URL, RESOURCE_URL, ATTR_UNIT_OF_MEASUREMENT) + ATTR_CURRENCY, ATTR_STREET_VIEW, ATTR_REDFIN_URL, RESOURCE_URL, ATTR_UNIT_OF_MEASUREMENT, STATE_CLASS_MEASUREMENT) from homeassistant.core import callback from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity from homeassistant.helpers.event import async_track_time_interval