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

Moodlight colors are forgotten between restarts of HA and plate #56

Closed
nagyrobi opened this issue May 31, 2021 · 3 comments
Closed

Moodlight colors are forgotten between restarts of HA and plate #56

nagyrobi opened this issue May 31, 2021 · 3 comments

Comments

@nagyrobi
Copy link
Collaborator

nagyrobi commented May 31, 2021

Version of the custom_component

0.6.0 main f597d75

Configuration

N/A

Describe the bug

Problem #12 (comment) still exists on Lanbons and current CC versions:

  • turn on moodlight from HA entity (the one created by this component)
  • select a nice color and brightnesd, and test by turning the moodlight on and off repeatedly from HA - everything's fine at this point
  • turn the moodlight OFF
  • restart HA and reboot or power-cycle plate in the same time
  • try turning on moodlight: color/brightness forgotten + error below

The real world case is very simple: a power outage can restart plates and HA in the same time.

Debug log


2021-05-31 13:36:09 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140523982527840] color_hs_to_RGB() argument after * must be an iterable, not NoneType
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 167, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1481, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1516, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 658, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 726, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 695, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 376, in async_handle_light_on_service
    await light.async_turn_on(**params)
  File "/config/custom_components/openhasp/light.py", line 507, in async_turn_on
    color_util.color_hs_to_RGB(*self._hs),
TypeError: color_hs_to_RGB() argument after * must be an iterable, not NoneType

@dgomes dgomes closed this as completed in 6a92b68 Jun 2, 2021
@nagyrobi nagyrobi reopened this Jun 10, 2021
@nagyrobi
Copy link
Collaborator Author

Related to HASwitchPlate/openHASP#99 (comment)

@nagyrobi
Copy link
Collaborator Author

nagyrobi commented Jun 23, 2021

Can be reproduced also by sequential restarts:

  • turn moodlight on, select a color
  • turn moodlight off
  • restart plate, wait for it to boot
  • restart HA, wait to finish and sync with the plate
  • turn moodlight on.: color is lost

@dgomes
Copy link
Collaborator

dgomes commented Nov 5, 2021

hope it's fixed ;)

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

No branches or pull requests

2 participants