Skip to content

Commit

Permalink
1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hakana committed Sep 12, 2022
1 parent 462d181 commit 8c45ba2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion custom_components/shelly/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

_LOGGER = logging.getLogger(__name__)

__version__ = "1.0.1"
__version__ = "1.0.2"
VERSION = __version__

async def async_setup(hass, config):
Expand Down
14 changes: 6 additions & 8 deletions custom_components/shelly/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
)
from homeassistant.components.light import (
ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_EFFECT, ATTR_HS_COLOR,
ATTR_WHITE_VALUE,
SUPPORT_BRIGHTNESS, SUPPORT_COLOR, SUPPORT_COLOR_TEMP, SUPPORT_EFFECT,
SUPPORT_WHITE_VALUE,
SUPPORT_BRIGHTNESS, SUPPORT_COLOR, SUPPORT_COLOR_TEMP, SUPPORT_EFFECT
)
from functools import partial
from homeassistant.helpers import config_validation as cv, entity_platform, service
Expand Down Expand Up @@ -231,8 +229,8 @@ def supported_features(self):
features = features | SUPPORT_COLOR_TEMP
if self._dev.effects_list is not None:
features = features | SUPPORT_EFFECT
if self._dev.support_white_value:
features = features | SUPPORT_WHITE_VALUE
#if self._dev.support_white_value:
# features = features | SUPPORT_WHITE_VALUE
return features

@property
Expand Down Expand Up @@ -287,9 +285,9 @@ def turn_on(self, **kwargs):
brightness = round(kwargs[ATTR_BRIGHTNESS] / 2.55)
self._brightness = brightness

if ATTR_WHITE_VALUE in kwargs:
white_value = int(kwargs[ATTR_WHITE_VALUE])
self._white_value = white_value
#if ATTR_WHITE_VALUE in kwargs:
# white_value = int(kwargs[ATTR_WHITE_VALUE])
# self._white_value = white_value

if ATTR_HS_COLOR in kwargs:
red, green, blue = \
Expand Down
2 changes: 1 addition & 1 deletion custom_components/shelly/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"domain": "shelly",
"name": "Shelly smart home",
"version": "1.0.1",
"version": "1.0.2",
"config_flow": true,
"documentation": "https://github.com/StyraHem/ShellyForHASS/blob/master/README.md",
"dependencies": ["zeroconf"],
Expand Down

0 comments on commit 8c45ba2

Please sign in to comment.