diff --git a/custom_components/crownstone/const.py b/custom_components/crownstone/const.py index 4f6d54d..b8e8ea2 100644 --- a/custom_components/crownstone/const.py +++ b/custom_components/crownstone/const.py @@ -7,6 +7,7 @@ # Platforms DOMAIN: Final = "crownstone" +PROJECT_NAME: Final = "home-assistant-hacs" PLATFORMS: Final[list[Platform]] = [Platform.LIGHT, Platform.SENSOR] # Listeners diff --git a/custom_components/crownstone/device_condition.py b/custom_components/crownstone/device_condition.py index 2a49b9a..273f112 100644 --- a/custom_components/crownstone/device_condition.py +++ b/custom_components/crownstone/device_condition.py @@ -177,12 +177,9 @@ async def async_get_condition_capabilities( @callback def async_condition_from_config( - config: ConfigType, config_validation: bool + hass: HomeAssistant, config: ConfigType ) -> condition.ConditionCheckerType: """Create a function to test a device condition.""" - if config_validation: - config = CONDITION_SCHEMA(config) - condition_type = config[CONF_TYPE] entity_id = config[CONF_ENTITY_ID] diff --git a/custom_components/crownstone/entry_manager.py b/custom_components/crownstone/entry_manager.py index f6c5551..8ac1843 100644 --- a/custom_components/crownstone/entry_manager.py +++ b/custom_components/crownstone/entry_manager.py @@ -28,6 +28,7 @@ CONF_USB_SPHERE, DOMAIN, PLATFORMS, + PROJECT_NAME, SSE_LISTENERS, UART_LISTENERS, ) @@ -85,6 +86,7 @@ async def async_setup(self) -> bool: password=password, access_token=self.cloud.access_token, websession=aiohttp_client.async_create_clientsession(self.hass), + project_name=PROJECT_NAME, ) # Listen for events in the background, without task tracking asyncio.create_task(self.async_process_events(self.sse)) diff --git a/custom_components/crownstone/manifest.json b/custom_components/crownstone/manifest.json index 1bea004..71752f2 100644 --- a/custom_components/crownstone/manifest.json +++ b/custom_components/crownstone/manifest.json @@ -6,7 +6,7 @@ "issue_tracker": "https://github.com/crownstone/crownstone-home-assistant/issues", "requirements": [ "crownstone-cloud==1.4.9", - "crownstone-sse==2.0.3", + "crownstone-sse==2.0.4", "crownstone-uart==2.1.0", "pyserial==3.5" ],