From 6f5e6823eef8957bb1164cc4e354bd9ede011eac Mon Sep 17 00:00:00 2001 From: Justin Dybedahl Date: Thu, 4 May 2023 22:28:05 -0500 Subject: [PATCH 1/3] Fix config flow --- custom_components/redfin/config_flow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ) From 22cbe3785c3137a186db369682da2d0fbcc640f3 Mon Sep 17 00:00:00 2001 From: Justin Dybedahl Date: Thu, 4 May 2023 22:29:43 -0500 Subject: [PATCH 2/3] Fix state class in const --- custom_components/redfin/const.py | 1 + 1 file changed, 1 insertion(+) 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" From 8c5bca0b2dc7d9159fcfece62e34956ba0396541 Mon Sep 17 00:00:00 2001 From: Justin Dybedahl Date: Thu, 4 May 2023 22:31:42 -0500 Subject: [PATCH 3/3] Fix state class in sensor --- custom_components/redfin/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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