Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6.0.0 Update broke the alarm panel card and automations #645

Closed
WvanWaas opened this issue Jan 4, 2023 · 18 comments
Closed

6.0.0 Update broke the alarm panel card and automations #645

WvanWaas opened this issue Jan 4, 2023 · 18 comments

Comments

@WvanWaas
Copy link

WvanWaas commented Jan 4, 2023

With updating Eufy to 6.0.0 the Alarm Panel Card has stopped working. I'm also missing my alarm_control_panel. entity

Alarm Panel Card Configuration
No matching entities found

Steps to reproduce the behavior:

  1. Install 6.0.0 via HACS
  2. Try to find alarm_control_panel

Steps to reproduce the behavior:

  1. Install 6.0.0 via HACS
  2. Add Alarm Panel Card Configuration

Expected behavior

I want my control card back and I would like to know my alarm state for the type: picture-elements card I am using.

Logger: homeassistant.components.alarm_control_panel
Source: custom_components/eufy_security/alarm_control_panel.py:166
Integration: Alarm control panel ([documentation](https://www.home-assistant.io/integrations/alarm_control_panel), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+alarm_control_panel%22))
First occurred: 10:40:19 AM (6 occurrences)
Last logged: 2:09:37 PM

Error adding entities for domain alarm_control_panel with platform eufy_security
Error while setting up eufy_security platform for alarm_control_panel
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 692, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 789, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 545, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 583, in _async_write_ha_state
    state = self._stringify_state(available)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 551, in _stringify_state
    if (state := self.state) is None:
  File "/config/custom_components/eufy_security/alarm_control_panel.py", line 166, in state
    return CurrentModeToStateValue[CurrentModeToState(current_mode).name].value
  File "/usr/local/lib/python3.10/enum.py", line 385, in __call__
    return cls.__new__(cls, value)
  File "/usr/local/lib/python3.10/enum.py", line 710, in __new__
    raise ve_exc
ValueError: 6 is not a valid CurrentModeToState
Logger: homeassistant
Source: custom_components/eufy_security/alarm_control_panel.py:166
Integration: Eufy Security ([documentation](https://github.com/fuatakgun/eufy_security), [issues](https://github.com/fuatakgun/eufy_security/issues))
First occurred: 10:50:19 AM (16 occurrences)
Last logged: 1:27:07 PM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 168, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 316, in _async_refresh
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 121, in async_update_listeners
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 381, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 545, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 583, in _async_write_ha_state
    state = self._stringify_state(available)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 551, in _stringify_state
    if (state := self.state) is None:
  File "/config/custom_components/eufy_security/alarm_control_panel.py", line 166, in state
    return CurrentModeToStateValue[CurrentModeToState(current_mode).name].value
  File "/usr/local/lib/python3.10/enum.py", line 385, in __call__
    return cls.__new__(cls, value)
  File "/usr/local/lib/python3.10/enum.py", line 710, in __new__
    raise ve_exc
ValueError: 6 is not a valid CurrentModeToState

@fuatakgun
Copy link
Owner

thanks, fix is merged, either wait for new version or get latest from master

@fuatakgun
Copy link
Owner

0ce1349

@sagilo
Copy link

sagilo commented Jan 5, 2023

@fuatakgun which version should this be fixed in?
I'm running 6.1.0 and my doorbell status isn't working as well
I can set the mode and it updates correctly, but the sensors value is "unknown"

Screenshot_20230105-082806~2

@fuatakgun
Copy link
Owner

fuatakgun commented Jan 5, 2023

Yours is a different problem. It was not created at all, you are saying that, it is always unknown.

Are you sure you have enabled notifications for Switch modes in eufy app? Without it, you won't get updates.

In any case, create a new issue to track this

@sagilo
Copy link

sagilo commented Jan 5, 2023

@fuatakgun I don't see any notification setting for the mode switch.
I also didn't find it in the readme
Can you please point me to it?

@fuatakgun
Copy link
Owner

Readme says that enable all notifications because integration relies on it.

I have this;

Screenshot_2023-01-05-09-04-24-858_com.oceanwing.battery.cam.jpg

@fuatakgun
Copy link
Owner

**As we already called out earlier, add-on heavily relies on push notifications, so you must enable all kind of push notifications (motion detected, person detected, lock events, alarm events etc) in your mobile app. These notifications are not user based but device based so after enabling all these notifications, your main account will probably bloated with many push notifications. In android, there is a setting to disable specific notifications, please use it. **

@sagilo
Copy link

sagilo commented Jan 5, 2023

@fuatakgun my pan&tilt camera has a "mode switch" notification toggle but the doorbell doesn't. (model T8200, firmware is up to date, so is the android app)
Should I file a separate issue?

image

@fuatakgun
Copy link
Owner

Yes, because, this issue was about having no alarm panel card

@fuatakgun
Copy link
Owner

New template will ask you to fill additional fields, i need them

@spaceboy76
Copy link

Still not working for me. Both devices show as unavailable and was working before the update

@fuatakgun
Copy link
Owner

Logs please @spaceboy76 or didn't happen :-)

@spaceboy76
Copy link

On mobile at present but I see this in the HA logs. The add on appears to be working fine

This error originated from a custom integration.

Logger: custom_components.eufy_security
Source: custom_components/eufy_security/eufy_security_api/web_socket_client.py:84
Integration: Eufy Security (documentation, issues)
First occurred: 10:13:47 (25 occurrences)
Last logged: 12:13:47

Unexpected error fetching eufy_security data:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 225, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 181, in _async_update_data
return await self.update_method()
File "/config/custom_components/eufy_security/coordinator.py", line 81, in _update_local
await self._api.poll_refresh()
File "/config/custom_components/eufy_security/eufy_security_api/api_client.py", line 381, in poll_refresh
await self._send_message_get_response(OutgoingMessage(command_type, command=command))
File "/config/custom_components/eufy_security/eufy_security_api/api_client.py", line 366, in _send_message_get_response
await self.send_message(message.content)
File "/config/custom_components/eufy_security/eufy_security_api/api_client.py", line 375, in send_message
await self._client.send_message(json.dumps(message))
File "/config/custom_components/eufy_security/eufy_security_api/web_socket_client.py", line 84, in send_message
raise WebSocketConnectionError()
custom_components.eufy_security.eufy_security_api.exceptions.WebSocketConnectionError

@fuatakgun
Copy link
Owner

this is a log for a broken state, I need logs from initial startup and I need logs, not only error statements, check issue template for log generation

@WvanWaas
Copy link
Author

WvanWaas commented Jan 5, 2023

Had the same issue again at 6.1.0 removed the device and reloaded with logs

Fixed with reload no idea why but it's working again.

At first had an error like this: (I hope it helps for others)

Logger: homeassistant.components.alarm_control_panel
Source: custom_components/eufy_security/alarm_control_panel.py:165
Integration: Alarm control panel ([documentation](https://www.home-assistant.io/integrations/alarm_control_panel), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+alarm_control_panel%22))
First occurred: 3:18:26 PM (4 occurrences)
Last logged: 3:24:50 PM

Error adding entities for domain alarm_control_panel with platform eufy_security
Error while setting up eufy_security platform for alarm_control_panel
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 438, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 709, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 804, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 556, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 597, in _async_write_ha_state
    state = self._stringify_state(available)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 562, in _stringify_state
    if (state := self.state) is None:
  File "/config/custom_components/eufy_security/alarm_control_panel.py", line 165, in state
    return CurrentModeToStateValue[CurrentModeToState.DISARMED].value
  File "/usr/local/lib/python3.10/enum.py", line 440, in __getitem__
    return cls._member_map_[name]
KeyError: <CurrentModeToState.DISARMED: 63>

@fuatakgun
Copy link
Owner

wow, what a simple mistake :(

please get latest code from master or wait for next version release

@spaceboy76
Copy link

should i just remove and re-add the integration then?

@WvanWaas
Copy link
Author

WvanWaas commented Jan 8, 2023

I can confirm this fix works! Thanks @fuatakgun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants