Skip to content

Commit

Permalink
Update for new light API
Browse files Browse the repository at this point in the history
  • Loading branch information
bigbadblunt committed Sep 18, 2021
1 parent 10ff8d4 commit 73103ad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions custom_components/lightwave2/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
except ImportError:
from homeassistant.components.light import Light as LightEntity
from homeassistant.components.light import (
ATTR_BRIGHTNESS, SUPPORT_BRIGHTNESS)
ATTR_BRIGHTNESS, COLOR_MODE_BRIGHTNESS)
from homeassistant.core import callback
from .const import DOMAIN

Expand Down Expand Up @@ -79,9 +79,14 @@ def async_update_callback(self, **kwargs):
self.async_schedule_update_ha_state(True)

@property
def supported_features(self):
def supported_color_modes(self):
"""Flag supported features."""
return SUPPORT_BRIGHTNESS
return {COLOR_MODE_BRIGHTNESS}

@property
def color_mode(self):
"""Flag supported features."""
return COLOR_MODE_BRIGHTNESS

@property
def should_poll(self):
Expand Down
2 changes: 1 addition & 1 deletion custom_components/lightwave2/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"domain": "lightwave2",
"name": "Lightwave v2 (Smart Series) custom component",
"version": "3.4.0",
"version": "3.4.1",
"documentation": "https://github.com/bigbadblunt/homeassistant-lightwave2",
"dependencies": [],
"codeowners": ["@bigbadblunt"],
Expand Down

0 comments on commit 73103ad

Please sign in to comment.