blakeblackshear / frigate-hass-integration

Frigate integration for Home Assistant
MIT License
720 stars 113 forks source link

HA 2022.3.0.dev20220203 breaks the integration's sensors and switches #212

Closed drthanwho closed 2 years ago

drthanwho commented 2 years ago

Version of the custom_component

2.2.1

Configuration


2022-02-06 23:05:00 ERROR (MainThread) [homeassistant.components.switch] Error adding entities for domain switch with platform frigate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 614, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 772, in add_to_platform_finish
    await self.async_added_to_hass()
  File "/config/custom_components/frigate/__init__.py", line 369, in async_added_to_hass
    self._sub_state = await async_subscribe_topics(
TypeError: async_subscribe_topics() takes 2 positional arguments but 3 were given
2022-02-06 23:05:00 ERROR (MainThread) [homeassistant.components.switch] Error while setting up frigate platform for switch
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 257, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 614, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 772, in add_to_platform_finish
    await self.async_added_to_hass()
  File "/config/custom_components/frigate/__init__.py", line 369, in async_added_to_hass
    self._sub_state = await async_subscribe_topics(
TypeError: async_subscribe_topics() takes 2 positional arguments but 3 were given
2022-02-06 23:07:06 ERROR (MainThread) [homeassistant.components.binary_sensor] Error adding entities for domain binary_sensor with platform frigate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 614, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 772, in add_to_platform_finish
    await self.async_added_to_hass()
  File "/config/custom_components/frigate/__init__.py", line 369, in async_added_to_hass
    self._sub_state = await async_subscribe_topics(
TypeError: async_subscribe_topics() takes 2 positional arguments but 3 were given
2022-02-06 23:07:07 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up frigate platform for binary_sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 257, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 614, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 772, in add_to_platform_finish
    await self.async_added_to_hass()
  File "/config/custom_components/frigate/__init__.py", line 369, in async_added_to_hass
    self._sub_state = await async_subscribe_topics(
TypeError: async_subscribe_topics() takes 2 positional arguments but 3 were given
2022-02-06 23:07:41 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform frigate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 614, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 772, in add_to_platform_finish
    await self.async_added_to_hass()
  File "/config/custom_components/frigate/__init__.py", line 369, in async_added_to_hass
    self._sub_state = await async_subscribe_topics(
TypeError: async_subscribe_topics() takes 2 positional arguments but 3 were given
2022-02-06 23:07:41 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up frigate platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 257, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 614, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 772, in add_to_platform_finish
    await self.async_added_to_hass()
  File "/config/custom_components/frigate/__init__.py", line 369, in async_added_to_hass
    self._sub_state = await async_subscribe_topics(
TypeError: async_subscribe_topics() takes 2 positional arguments but 3 were given

Describe the bug

A clear and concise description of what the bug is.

All sensors / binary_sensors and switches are no longer working image

Debug log


Add your logs here.
dermotduffy commented 2 years ago

Caused by this upstream change: https://github.com/home-assistant/core/pull/65415

Fix required -- working on it.

drthanwho commented 2 years ago

As long as we know why 😄

R5fan commented 2 years ago

This fix may work when you upgrade from an older version, but Im doing a fresh install of 2022.3.3 and I can not install the integration on it. I have installed frigate (which works) and the HACS integration, but when I go to HA > configuration > integration, the frigate integration doesnt show up.

blakeblackshear commented 2 years ago

This is probably the cache issue. The available integrations comes from a cache somewhere. Try a different browser or clear your cache.

ExplodingCow commented 2 years ago

I'm facing the same issue, and I just installed the Frigate custom integration from HACS today. HACS is still showing v2.2.1 as the latest version. It could have something to do v2.2.2 not appearing on the releases page.

image
dermotduffy commented 2 years ago

This is very strange -- something is causing github to show v2.2.1 as the latest instead of v2.2.2 . The latest label appears to attach to the release notes edited most recently, so I could guess that the prior release notes are being modified by the release-drafter if a label on an underlying bug changes.

In any case, I just (again again) set v2.2.2 as the latest.

image