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

NeoPixel and nightlight #14

Open
tiagombrito opened this issue Aug 24, 2023 · 5 comments
Open

NeoPixel and nightlight #14

tiagombrito opened this issue Aug 24, 2023 · 5 comments

Comments

@tiagombrito
Copy link

tiagombrito commented Aug 24, 2023

Hello,

I'm wondering if what i'm observing is the intended behaviour of the wall switch.

When I turn the NeoPixel light on and then push one of the touchfields, the light is turned off.
In home assistant the entity is still shown as on.
I've seen this happening in 3 different devices, with 1 and 2 channels

When i do the same thing with the nightlight, the light doesn't turn off, but it dims and returns to full brightness 2 seconds later.

I'm thinking this may happen because of the light effects on touch, multi touch, etc. that are overriding the neopixel light.
I made all effect brightnesses 0 so as to not have any effects, is there any more appropriate way to do have no effects?

Thank you.

@danielscheidler
Copy link
Member

Thanks for the feedback. I'll take a look at the effects and brightness again.
To have no effects you can set them to "None" I think.

@barth11
Copy link

barth11 commented May 8, 2024

I have a similar problem. I don't use nightlight but I created an automation which on multitouch enables Pulse effect which I have to repeat after multitouch effect is done...now I have it set to repeat after 3 seconds.
When I don't do it the Neopixel is still on but LEDs are off and only the status LEDs are pulsing 😁
See here: https://streamable.com/22ah2w

This automation with the delay is a workaround to this problem because it enables the Pulse after the multitouch effect is done effecting...
Delay could be as the first step but I wanted the LEDs to react immediately so that's why it's like that.

alias: Enable/Disable LED TX1
description: ""
trigger:
  - type: turned_off
    platform: device
    device_id: 4630bde13982e46e50fe7b6aff640287
    entity_id: ed83d39e9d3ecaf2ab120894e5cb1724
    domain: binary_sensor
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: light.txultimate2_neopixel_light
            state: "on"
        sequence:
          - service: light.turn_off
            data: {}
            target:
              entity_id: light.txultimate2_neopixel_light
      - conditions:
          - condition: state
            entity_id: light.txultimate2_neopixel_light
            state: "off"
        sequence:
          - service: light.turn_on
            target:
              entity_id: light.txultimate2_neopixel_light
            data:
              rgb_color:
                - 236
                - 55
                - 168
              brightness: 254
              effect: Pulse
          - delay:
              hours: 0
              minutes: 0
              seconds: 3
              milliseconds: 0
          - service: light.turn_on
            target:
              entity_id: light.txultimate2_neopixel_light
            data:
              rgb_color:
                - 236
                - 55
                - 168
              brightness: 255
              effect: Pulse

Interestingly this workaround doesn't work for Neopixel effect "None". As far as I tested it for now.
EDIT: For None I went with 10s and it works...

@barth11
Copy link

barth11 commented May 8, 2024

I just did some more testing and I don't know if it was the version or my setup but ignoring my comment above a trying it on another device the NeoPixel light gets overridden by the effect of pressing any button or multitouch. It's really bad that the light effect override user setup.

@Zedread
Copy link

Zedread commented May 16, 2024

There is a "workaround" for this, instead of trying to use the Neopixel entity for displaying your automation, use the Nightlight entity.
The "problem" here is that the implementation is prepared to "recover" the nightlight display above all other settings, if you have nightlight on, and a button on at the same time, when you turn off the button the code sets that led partition to display the nightlight definition.
I've run into the same problem as you, and tried to modify the code to no luck, but in the end i realized i didn't need it, i just need to change the entity i was using.
So if you start using the Nightlight entity instead of the Neopixel you should be able to do what you intended.

@barth11
Copy link

barth11 commented May 16, 2024

But this will only work with solid colours no? If I choose rainbow or other effect which NeoPixel has, then it'll not work. Or at least I don't see a possibility how to set Nightlight as Rainbow effect.

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

4 participants