Skip to content

Commit

Permalink
crownstone-sse: bump to 2.0.4
Browse files Browse the repository at this point in the history
Fixes blocking home assistant when sse server loses connection with the cloud
  • Loading branch information
RicArch97 committed Sep 15, 2022
1 parent 7bc4c50 commit 06834d6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions custom_components/crownstone/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

# Platforms
DOMAIN: Final = "crownstone"
PROJECT_NAME: Final = "home-assistant-hacs"
PLATFORMS: Final[list[Platform]] = [Platform.LIGHT, Platform.SENSOR]

# Listeners
Expand Down
5 changes: 1 addition & 4 deletions custom_components/crownstone/device_condition.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
2 changes: 2 additions & 0 deletions custom_components/crownstone/entry_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
CONF_USB_SPHERE,
DOMAIN,
PLATFORMS,
PROJECT_NAME,
SSE_LISTENERS,
UART_LISTENERS,
)
Expand Down Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion custom_components/crownstone/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
],
Expand Down

0 comments on commit 06834d6

Please sign in to comment.