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

not working: effect selection and activation #1

Open
jonathanrobichaud4 opened this issue Mar 6, 2024 · 9 comments
Open

not working: effect selection and activation #1

jonathanrobichaud4 opened this issue Mar 6, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@jonathanrobichaud4
Copy link
Owner

jonathanrobichaud4 commented Mar 6, 2024

OP: @KC-inDomus
Issue originally posted here.

tested. 1D-2D-3D-4D effects are on the effects list. not working: effect selection and activation (the new ones as the standard ones).

@KC-inDomus
Copy link

now it works fine. don't know why. tried restarting the whole chain, now everything (I mean everything) works.

@jonathanrobichaud4
Copy link
Owner Author

@KC-inDomus that is very weird! Keep me updated if anything else goes wrong. It's been working well for me but I'm not sure if it's affected home assistant by like slowing it down or causing more errors as it seems like I have more errors in my logs but they're all unrelated to the integration

@KC-inDomus
Copy link

KC-inDomus commented Mar 12, 2024

still working fine. just a question: thinking about asking to merge this changes you made to the official nanoleaf integration?

@jonathanrobichaud4
Copy link
Owner Author

Currently I have a PR in the upstream aionanoleaf package but I think someone mentioned it isn't maintained anymore. I also don't really want to replace the package in the main homeassistant integration if we're not sure it will cause issues with a homeassistant instance. For now I'd say test for a bit and then we'll see in a month? I also am unsure if my/nanoleaf's methods of getting the 4d modes from the device are up to HA's quality standards as it is a bit janky.

@KC-inDomus
Copy link

KC-inDomus commented Mar 14, 2024

Pick one: or the main aionanoleaf gets your (goodi, imho) PR, or you can hypothesize to release an autonomous custom component (alternative to the actual official integration) ;)

@jonathanrobichaud4
Copy link
Owner Author

jonathanrobichaud4 commented Apr 18, 2024

Pick one: or the main aionanoleaf gets your (goodi, imho) PR, or you can hypothesize to release an autonomous custom component (alternative to the actual official integration) ;)

Hey, sorry for not replying earlier!! I have been busy with school and finals season. I'm just going to keep this as a custom integration for now since it makes maintenance easier for me! If someone else came along and wanted to merge the code I'm perfectly ok with that though! However I don't think it would get merged into home assistant until events are added to the API.

@bobdivx
Copy link

bobdivx commented Dec 22, 2024

Hello and thanks for the work but it doesn't work for me: Failed to execute action light/turn_on. 'Nanoleaf' object has no attribute 'set_emersion

@jonathanrobichaud4
Copy link
Owner Author

jonathanrobichaud4 commented Dec 23, 2024

Hello and thanks for the work but it doesn't work for me: Failed to execute action light/turn_on. 'Nanoleaf' object has no attribute 'set_emersion

What kind of device are you using the integration with? 4D or something else like shapes? I'm not sure what the problem could be. If you could check your logs and see if it tells you anything else and attach them here? I just tested it and it's still working for me so it might be something with your setup? Also, is it when you're just turning on or setting the effect as well?

@bobdivx
Copy link

bobdivx commented Dec 23, 2024

Thank you for taking the time to answer me. The effects work except 1D 2D 3D and 4D.
Screenshot_2024-12-23-07-44-25-91_b3c444c8d6439c474e204aed8aeaa2d1

My model is the NL69.

Logs:
`Cette erreur provient d'une intégration personnalisée

Enregistreur: homeassistant
Source: custom_components/nanoleaf/light.py:92
intégration: Nanoleaf
S'est produit pour la première fois: 22 décembre 2024 à 18:44:24 (132 occurrences)
Dernier enregistrement: 07:41:15

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 267, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 478, in _async_refresh
self.async_update_listeners()
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 177, in async_update_listeners
update_callback()
~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 558, in _handle_coordinator_update
self.async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1023, in async_write_ha_state
self._async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1148, in _async_write_ha_state
self.__async_calculate_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1087, in __async_calculate_state
if state_attributes := self.state_attributes:
^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 1199, in state_attributes
data[ATTR_EFFECT] = effect = self.effect if _is_on else None
^^^^^^^^^^^
File "/config/custom_components/nanoleaf/light.py", line 92, in effect
active_effect = self._nanoleaf.emersion
^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Nanoleaf' object has no attribute 'emersion'`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants