-
Notifications
You must be signed in to change notification settings - Fork 46
cannot import name 'ATTR_WHITE_VALUE' #68
Comments
Unfortunately/naturally I am getting the same error. Just upgraded to HA 2022.9.0. |
Same issue here... It does look related to: LightEntity no longer supports white_value in 2022.9
|
Same here after upgrade to HA 2022.9.0 |
Just for providing a solution here, you can switch over to my fork which has a complete compatible configuration and supports HA 2022.9: |
I'm seeing the same problem after updating to 2022.9.1. I'll give @Breina's fork a try. |
I couldn't even restart HA due to the To work around this I edited the As a side effect, this fixed the hass-dmx integration for me. But I'm still planning on moving given that this project doesn't seem very well supported currently. |
https://github.com/Breina/ha-artnet-led is really working fine... you have to slightly change your configuration, but just follow the good documentation and you're immediately up and running. My diff (controlling aquarium lights this way) looks like this: -- platform: dmx
+- platform: artnet_led
host: aquarium.local
- default_type: dimmer
port: 6454
- dmx_channels: 512
- default_level: 255
- universe: 0
- devices:
- - channel: 1
- name: Aquarium Polar
- - channel: 2
- name: Aquarium Day
- - channel: 3
- name: Aquarium Sunset
+ universes:
+ 0:
+ output_correction: quadratic
+ devices:
+ - channel: 1
+ type: dimmer
+ name: Aquarium Polar
+ - channel: 2
+ type: dimmer
+ name: Aquarium Day
+ - channel: 3
+ type: dimmer
+ name: Aquarium Sunset |
I fixed this (temporarily) by commenting out try:
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_HS_COLOR,
ATTR_TRANSITION,
# ATTR_WHITE_VALUE,
ATTR_COLOR_TEMP,
LightEntity,
PLATFORM_SCHEMA,
SUPPORT_BRIGHTNESS,
SUPPORT_COLOR,
SUPPORT_WHITE_VALUE,
SUPPORT_TRANSITION,
SUPPORT_COLOR_TEMP,
)
except ImportError:
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_HS_COLOR,
ATTR_TRANSITION,
# ATTR_WHITE_VALUE,
ATTR_COLOR_TEMP,
# Light as LightEntity,
LightEntity,
PLATFORM_SCHEMA,
SUPPORT_BRIGHTNESS,
SUPPORT_COLOR,
# SUPPORT_WHITE_VALUE,
SUPPORT_TRANSITION,
SUPPORT_COLOR_TEMP,
)
from homeassistant.util.color import color_rgb_to_rgbw
from homeassistant.helpers.restore_state import RestoreEntity
from homeassistant.core import callback
import homeassistant.helpers.config_validation as cv
import homeassistant.util.color as color_util
import voluptuous as vol
ATTR_WHITE_VALUE = 255
SUPPORT_WHITE_VALUE = True I also had to change |
Get error recently with HA
log error:
Logger: homeassistant.config
Source: custom_components/dmx/light.py:40
Integration: dmx (documentation)
First occurred: 8:37:24 AM (1 occurrences)
Last logged: 8:37:24 AM
Platform error: light
Traceback (most recent call last):
File "/config/custom_components/dmx/light.py", line 25, in
from homeassistant.components.light import (
ImportError: cannot import name 'ATTR_WHITE_VALUE' from 'homeassistant.components.light' (/usr/src/homeassistant/homeassistant/components/light/init.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config.py", line 878, in async_process_component_config
platform = p_integration.get_platform(domain)
File "/usr/src/homeassistant/homeassistant/loader.py", line 681, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 698, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/local/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/config/custom_components/dmx/light.py", line 40, in
from homeassistant.components.light import (
ImportError: cannot import name 'ATTR_WHITE_VALUE' from 'homeassistant.components.light' (/usr/src/homeassistant/homeassistant/components/light/init.py)
The text was updated successfully, but these errors were encountered: