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

Value for channel isn't within bound occurring on light.turn_off #17

Open
filmgarage opened this issue Oct 24, 2022 · 6 comments
Open

Comments

@filmgarage
Copy link

Since the last update (v0.0.11) I have a strange error for one of the fixtures, this error comes up when I try to switch the light off with a simple light.turn_off service:

Value for channel c isn't within bound: -23.796610169491526
Value for channel c isn't within bound: -17.97966101694915
@Breina
Copy link
Owner

Breina commented Nov 13, 2022

Can you please include the config of that fixture? Have you configured min_temp and/or max_temp?

@filmgarage
Copy link
Author

It concerns a whole bunch of fixtures that have been grouped together:
Group:

light:
  - platform: group
    name: EM4 Stellingen DMX
    unique_id: light_em4_stellingen_dmx
    entities:
      - light.balk01
      - light.balk02
      - light.balk03
      - light.balk04
      - light.balk05
      - light.balk06
      - light.balk07
      - light.balk08
      - light.balk09
      - light.balk10
      - light.balk11
      - light.balk12
      - light.balk13
      - light.balk14
      - light.balk15
      - light.balk16
      - light.balk17
      - light.balk18
      # Looppad
      - light.balk25
      - light.balk26
      - light.balk27
      - light.balk28
      - light.balk29

And the fixtures individually:

# DMX lights
- platform: artnet_led
  host: 192.168.66.246
  port: 6454
  universes:
    0:
      devices:
        - channel: 101
          name: Balk01
          type: color_temp
          channel_setup: dT
        - channel: 103
          name: Balk02
          type: color_temp
          channel_setup: dT
        - channel: 105
          name: Balk03
          type: color_temp
          channel_setup: dT
        - channel: 107
          name: Balk04
          type: color_temp
          channel_setup: dT
        - channel: 109
          name: Balk05
          type: color_temp
          channel_setup: dT
        - channel: 111
          name: Balk06
          type: color_temp
          channel_setup: dT
        - channel: 113
          name: Balk07
          type: color_temp
          channel_setup: dT
        - channel: 115
          name: Balk08
          type: color_temp
          channel_setup: dT
        - channel: 117
          name: Balk09
          type: color_temp
          channel_setup: dT
        - channel: 119
          name: Balk10
          type: color_temp
          channel_setup: dT
        - channel: 121
          name: Balk11
          type: color_temp
          channel_setup: dT
        - channel: 123
          name: Balk12
          type: color_temp
          channel_setup: dT
        - channel: 125
          name: Balk13
          type: color_temp
          channel_setup: dT
        - channel: 127
          name: Balk14
          type: color_temp
          channel_setup: dT
        - channel: 129
          name: Balk15
          type: color_temp
          channel_setup: dT
        - channel: 131
          name: Balk16
          type: color_temp
          channel_setup: dT
        - channel: 133
          name: Balk17
          type: color_temp
          channel_setup: dT
        - channel: 135
          name: Balk18
          type: color_temp
          channel_setup: dT
        - channel: 149
          name: Balk25
          type: color_temp
          channel_setup: dT
        - channel: 151
          name: Balk26
          type: color_temp
          channel_setup: dT
        - channel: 153
          name: Balk27
          type: color_temp
          channel_setup: dT
        - channel: 155
          name: Balk28
          type: color_temp
          channel_setup: dT
        - channel: 157
          name: Balk29
          type: color_temp
          channel_setup: dT

@Breina
Copy link
Owner

Breina commented Nov 13, 2022

I can't seem to break it when playing with the UI, only when sending malicious service calls, i.e.:

service: light.turn_on
data:
  color_temp: 1
  brightness_pct: 80
target:
  entity_id: light.em4_stellingen_dmx

Where color_temp is 1 here, but should generally be between 153 and 370. You could do the same by setting out of bounds xy_color or hs_color. Is it possible that one of your integrations is calling it wrong?

@filmgarage
Copy link
Author

Still haven't figured that out... I will try and investigate this week!

@Toreca
Copy link

Toreca commented Feb 27, 2023

Adding my experience:

This service:

service: light.turn_on
entity_id: light.led_pasek_loznice_cct
data:
  brightness_pct: 20
  color_temp: 2750

Caused this error:

Tato chyba pochází z vlastní integrace.

Logger: custom_components.artnet_led.util.channel_switch
Source: custom_components/artnet_led/util/channel_switch.py:79
Integration: artnet_led (documentation, issues)
First occurred: 00:31:18 (1 occurrences)
Last logged: 00:31:18

Value for channel c isn't within bound: -47

For this light definition:

        - channel: 19
          name: LED pásek - Ložnice CCT
          type: color_temp
          channel_size: '8bit'
          min_temp: 2700K
          max_temp: 6000K
          channel_setup: ch
          transition: 1

One more for the same light:

This service:

service: light.turn_on
entity_id: light.led_pasek_loznice_cct
data:
  brightness_pct: 20
  color_temp: 1

Caused this error:

Tato chyba pochází z vlastní integrace.

Logger: custom_components.artnet_led.util.channel_switch
Source: custom_components/artnet_led/util/channel_switch.py:79
Integration: artnet_led (documentation, issues)
First occurred: 00:35:25 (1 occurrences)
Last logged: 00:35:25

Value for channel h isn't within bound: -23

@Breina
Copy link
Owner

Breina commented Mar 1, 2023

Ah indeed, that does explain it!

The color_temp is for color temperature defined in "Mireds", which is by default between 153 and 500. Any range outside that, will also be outside the channel bounds.

If you want to use the Kelvin scale, please use the property color_temp_kelvin, which is between 2700 and 6500 by default. 1 never seems to be a correct color temperature for anything.

Reference: https://www.home-assistant.io/integrations/light/#service-lightturn_on

I'll use this issue to create a better error message instead, that's the best I can do.

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

3 participants