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

Add support for IO RGB Light (io:DimmableRGBLightIOComponent) #73

Closed
jurgen272 opened this issue Jun 19, 2020 · 17 comments · Fixed by #75
Closed

Add support for IO RGB Light (io:DimmableRGBLightIOComponent) #73

jurgen272 opened this issue Jun 19, 2020 · 17 comments · Fixed by #75
Assignees
Labels
enhancement New feature or request platform: light
Milestone

Comments

@jurgen272
Copy link

jurgen272 commented Jun 19, 2020

IO RGB Light.
ON/Off and dimming is working at this moment, but I can't change the colors

Device details

{
         "creationTime":1590511973000,
         "lastUpdateTime":1590511973000,
         "label":"Light Terras RGB",
         "deviceURL":"io://xxxxxxx",
         "shortcut":false,
         "controllableName":"io:DimmableRGBLightIOComponent",
         "definition":{
            "commands":[
               {
                  "commandName":"delayedStopIdentify",
                  "nparams":1
               },
               {
                  "commandName":"getName",
                  "nparams":0
               },
               {
                  "commandName":"identify",
                  "nparams":0
               },
               {
                  "commandName":"my",
                  "nparams":0
               },
               {
                  "commandName":"off",
                  "nparams":0
               },
               {
                  "commandName":"on",
                  "nparams":0
               },
               {
                  "commandName":"onWithTimer",
                  "nparams":1
               },
               {
                  "commandName":"refreshMemorized1Position",
                  "nparams":0
               },
               {
                  "commandName":"setIntensity",
                  "nparams":1
               },
               {
                  "commandName":"setIntensityWithTimer",
                  "nparams":3
               },
               {
                  "commandName":"setMemorized1Position",
                  "nparams":1
               },
               {
                  "commandName":"setName",
                  "nparams":1
               },
               {
                  "commandName":"setOnOff",
                  "nparams":1
               },
               {
                  "commandName":"setPosition",
                  "nparams":1
               },
               {
                  "commandName":"setRGB",
                  "nparams":3
               },
               {
                  "commandName":"setRGBWithTimer",
                  "nparams":4
               },
               {
                  "commandName":"setSecuredPosition",
                  "nparams":1
               },
               {
                  "commandName":"startIdentify",
                  "nparams":0
               },
               {
                  "commandName":"stopIdentify",
                  "nparams":0
               },
               {
                  "commandName":"wink",
                  "nparams":1
               }
            ],
            "states":[
               {
                  "type":"ContinuousState",
                  "qualifiedName":"core:BlueColorIntensityState"
               },
               {
                  "type":"ContinuousState",
                  "qualifiedName":"core:GreenColorIntensityState"
               },
               {
                  "type":"ContinuousState",
                  "qualifiedName":"core:LightIntensityState"
               },
               {
                  "type":"ContinuousState",
                  "qualifiedName":"core:Memorized1PositionState"
               },
               {
                  "type":"DataState",
                  "qualifiedName":"core:NameState"
               },
               {
                  "values":[
                     "off",
                     "on"
                  ],
                  "type":"DiscreteState",
                  "qualifiedName":"core:OnOffState"
               },
               {
                  "type":"ContinuousState",
                  "qualifiedName":"core:PriorityLockTimerState"
               },
               {
                  "type":"ContinuousState",
                  "qualifiedName":"core:RSSILevelState"
               },
               {
                  "type":"ContinuousState",
                  "qualifiedName":"core:RedColorIntensityState"
               },
               {
                  "type":"ContinuousState",
                  "qualifiedName":"core:SecuredPositionState"
               },
               {
                  "values":[
                     "available",
                     "unavailable"
                  ],
                  "type":"DiscreteState",
                  "qualifiedName":"core:StatusState"
               },
               {
                  "values":[
                     "comfortLevel1",
                     "comfortLevel2",
                     "comfortLevel3",
                     "comfortLevel4",
                     "environmentProtection",
                     "humanProtection",
                     "userLevel1",
                     "userLevel2"
                  ],
                  "type":"DiscreteState",
                  "qualifiedName":"io:PriorityLockLevelState"
               },
               {
                  "values":[
                     "LSC",
                     "SAAC",
                     "SFC",
                     "UPS",
                     "externalGateway",
                     "localUser",
                     "myself",
                     "rain",
                     "security",
                     "temperature",
                     "timer",
                     "user",
                     "wind"
                  ],
                  "type":"DiscreteState",
                  "qualifiedName":"io:PriorityLockOriginatorState"
               }
            ],
            "dataProperties":[
               {
                  "value":"500",
                  "qualifiedName":"core:identifyInterval"
               }
            ],
            "widgetName":"DimmerRGBColouredLight",
            "uiClass":"Light",
            "qualifiedName":"io:DimmableRGBLightIOComponent",
            "type":"ACTUATOR"
         },
         "states":[
            {
               "name":"core:NameState",
               "type":3,
               "value":"Light Terras RGB"
            },
            {
               "name":"core:PriorityLockTimerState",
               "type":1,
               "value":0
            },
            {
               "name":"core:StatusState",
               "type":3,
               "value":"available"
            },
            {
               "name":"core:RSSILevelState",
               "type":2,
               "value":28.0
            },
            {
               "name":"core:OnOffState",
               "type":3,
               "value":"off"
            },
            {
               "name":"core:LightIntensityState",
               "type":1,
               "value":0
            },
            {
               "name":"core:RedColorIntensityState",
               "type":1,
               "value":0
            },
            {
               "name":"core:GreenColorIntensityState",
               "type":1,
               "value":0
            },
            {
               "name":"core:BlueColorIntensityState",
               "type":1,
               "value":0
            }
         ],
         "attributes":[

         ],
         "available":true,
         "enabled":true,
         "placeOID":"xxxxxx",
         "widget":"DimmerRGBColouredLight",
         "type":1,
         "oid":"xxx",
         "uiClass":"Light"
      }
@vlebourl
Copy link
Collaborator

Thanks for the report. RGB support isn't implemented yet as we didn't have any device to use as a base. We'll work on that for future releases!

@vlebourl vlebourl added enhancement New feature or request platform: light and removed new-device labels Jun 19, 2020
@vlebourl vlebourl self-assigned this Jun 19, 2020
@vlebourl vlebourl added this to the core release milestone Jun 19, 2020
@vlebourl
Copy link
Collaborator

Could you retrieve the values for

            {
               "name":"core:RedColorIntensityState",
               "type":1,
               "value":0
            },
            {
               "name":"core:GreenColorIntensityState",
               "type":1,
               "value":0
            },
            {
               "name":"core:BlueColorIntensityState",
               "type":1,
               "value":0
            }

when the light is on with the 3 colors at full intensity (white I guess)? I wonder whether the max value is 100 or 255.

@vlebourl
Copy link
Collaborator

vlebourl commented Jun 19, 2020

Are you familiar enough with git and HA to pull and test a particular branch?
If so, can you try this one? https://github.com/iMicknl/ha-tahoma/tree/add_light_rgb

@jurgen272
Copy link
Author

RedColorIntensityState

255

@jurgen272
Copy link
Author

Are you familiar enough with git and HA to pull and test a particular branch?
If so, can you try this one? https://github.com/iMicknl/ha-tahoma/tree/add_light_rgb

Not familiar, but I'm a fast learner ;-)
So it should work with some brief explanations or links to what I should do.

@iMicknl
Copy link
Owner

iMicknl commented Jun 19, 2020

You don't need git knowledge. You can just go to https://github.com/iMicknl/ha-tahoma/tree/add_light_rgb and press the green button 'clone or download'. Choose 'Download ZIP'.

Now you can move the custom_components/tahoma folder to your Home Assistant config. So just overwrite the tahoma folder in your custom_components folder.

@vlebourl
Copy link
Collaborator

just fixed rgb limits from 0 to 255 instead of 0 to 100. be sure to get the last revision.

@jurgen272
Copy link
Author

jurgen272 commented Jun 19, 2020

I hope I did

You don't need git knowledge. You can just go to https://github.com/iMicknl/ha-tahoma/tree/add_light_rgb and press the green button 'clone or download'. Choose 'Download ZIP'.
Now you can move the custom_components/tahoma folder to your Home Assistant config. So just overwrite the tahoma folder in your custom_components folder.

I hope I did this correct, but still on/off and dimming OK, but can't change the color.
I get the color picker when I activate the light, but no changes when selecting a different color.

Just saw the latest comment on values 255 and 100.
Will test this ASAP.

@iMicknl iMicknl reopened this Jun 19, 2020
@vlebourl
Copy link
Collaborator

Added rgb state update to the branch, can you update?

Repository owner deleted a comment from jurgen272 Jun 19, 2020
@jurgen272
Copy link
Author

Still the same.

@vlebourl
Copy link
Collaborator

vlebourl commented Jun 19, 2020

Added some more messages in the logs.
can you report any message related to the lights? You should have 3 different warnings:
light states:
light.turn_on kwargs:
self._rgb:
Thanks

@jurgen272
Copy link
Author

jurgen272 commented Jun 19, 2020

2020-06-19 15:49:09 WARNING (SyncWorker_4) [custom_components.tahoma.light] light states:
{'core:NameState': 'Light Links', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 52.0, 'core:LightIntensityState': 0, 'core:OnOffState': 'off'}
2020-06-19 15:49:10 WARNING (SyncWorker_8) [custom_components.tahoma.light] light states:
{'core:NameState': 'Paal Living', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 38.0, 'core:LightIntensityState': 0, 'core:OnOffState': 'off'}
2020-06-19 15:49:10 WARNING (SyncWorker_6) [custom_components.tahoma.light] light states:
{'core:NameState': 'Paal Buren', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 36.0, 'core:LightIntensityState': 0, 'core:OnOffState': 'off'}
2020-06-19 15:49:11 WARNING (SyncWorker_3) [custom_components.tahoma.light] light states:
{'core:NameState': 'Light Terras RGB', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 36.0, 'core:OnOffState': 'off', 'core:LightIntensityState': 0, 'core:RedColorIntensityState': 0, 'core:GreenColorIntensityState': 0, 'core:BlueColorIntensityState': 0}
2020-06-19 15:49:11 WARNING (SyncWorker_0) [custom_components.tahoma.light] light states:
{'core:NameState': 'Paal Vijver', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 34.0, 'core:LightIntensityState': 0, 'core:OnOffState': 'off'}
2020-06-19 15:49:11 WARNING (SyncWorker_8) [custom_components.tahoma.light] light states:
{'core:NameState': 'Light Rechts', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 52.0, 'core:LightIntensityState': 0, 'core:OnOffState': 'off'}
2020-06-19 15:49:11 WARNING (SyncWorker_3) [custom_components.tahoma.light] light.turn_on kwargs: {'brightness': 166}
2020-06-19 15:49:16 WARNING (SyncWorker_7) [custom_components.tahoma.light] light states:
{'core:NameState': 'Light Terras RGB', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 44.0, 'core:OnOffState': 'on', 'core:LightIntensityState': 65, 'core:RedColorIntensityState': 166, 'core:GreenColorIntensityState': 165, 'core:BlueColorIntensityState': 164}
2020-06-19 15:49:18 WARNING (SyncWorker_9) [custom_components.tahoma.light] light.turn_on kwargs: {'hs_color': (360.0, 85.71428571428571)}
2020-06-19 15:49:21 WARNING (SyncWorker_8) [custom_components.tahoma.light] light.turn_on kwargs: {'hs_color': (90.0, 100.0)}
2020-06-19 15:49:22 WARNING (SyncWorker_3) [custom_components.tahoma.light] light states:
{'core:NameState': 'Light Terras RGB', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 42.0, 'core:OnOffState': 'on', 'core:LightIntensityState': 100, 'core:RedColorIntensityState': 255, 'core:GreenColorIntensityState': 254, 'core:BlueColorIntensityState': 252}
2020-06-19 15:49:22 WARNING (SyncWorker_0) [custom_components.tahoma.light] light.turn_on kwargs: {'hs_color': (135.0, 85.71428571428571)}
2020-06-19 15:49:24 WARNING (SyncWorker_6) [custom_components.tahoma.light] light states:
{'core:NameState': 'Light Terras RGB', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 42.0, 'core:OnOffState': 'on', 'core:LightIntensityState': 100, 'core:RedColorIntensityState': 255, 'core:GreenColorIntensityState': 254, 'core:BlueColorIntensityState': 252}
2020-06-19 15:49:26 WARNING (SyncWorker_2) [custom_components.tahoma.light] light.turn_on kwargs: {'hs_color': (240.0, 85.71428571428571)}
2020-06-19 15:49:27 WARNING (SyncWorker_6) [custom_components.tahoma.light] light states:
{'core:NameState': 'Light Terras RGB', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 36.0, 'core:OnOffState': 'on', 'core:LightIntensityState': 100, 'core:RedColorIntensityState': 255, 'core:GreenColorIntensityState': 254, 'core:BlueColorIntensityState': 252}
2020-06-19 15:49:27 WARNING (SyncWorker_0) [custom_components.tahoma.light] light.turn_on kwargs: {'hs_color': (315.0, 85.71428571428571)}
2020-06-19 15:49:28 WARNING (SyncWorker_5) [custom_components.tahoma.light] light.turn_on kwargs: {'hs_color': (360.0, 85.71428571428571)}
2020-06-19 15:49:28 WARNING (SyncWorker_7) [custom_components.tahoma.light] light states:
{'core:NameState': 'Light Terras RGB', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 44.0, 'core:OnOffState': 'on', 'core:LightIntensityState': 100, 'core:RedColorIntensityState': 255, 'core:GreenColorIntensityState': 254, 'core:BlueColorIntensityState': 252}
2020-06-19 15:49:35 WARNING (SyncWorker_6) [custom_components.tahoma.light] light states:
{'core:NameState': 'Light Terras RGB', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 48.0, 'core:OnOffState': 'off', 'core:LightIntensityState': 0, 'core:RedColorIntensityState': 0, 'core:GreenColorIntensityState': 0, 'core:BlueColorIntensityState': 0}
2020-06-19 15:49:35 WARNING (SyncWorker_6) [custom_components.tahoma.light] light.turn_on kwargs: {}
2020-06-19 15:49:40 WARNING (SyncWorker_8) [custom_components.tahoma.light] light.turn_on kwargs: {}
2020-06-19 15:49:41 WARNING (SyncWorker_0) [custom_components.tahoma.light] light states:
{'core:NameState': 'Light Links', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 52.0, 'core:LightIntensityState': 0, 'core:OnOffState': 'off'}
2020-06-19 15:49:41 WARNING (SyncWorker_1) [custom_components.tahoma.light] light states:
{'core:NameState': 'Paal Living', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 38.0, 'core:LightIntensityState': 0, 'core:OnOffState': 'off'}
2020-06-19 15:49:42 WARNING (SyncWorker_9) [custom_components.tahoma.light] light states:
{'core:NameState': 'Paal Buren', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 36.0, 'core:LightIntensityState': 0, 'core:OnOffState': 'off'}
2020-06-19 15:49:43 WARNING (SyncWorker_9) [custom_components.tahoma.light] light states:
{'core:NameState': 'Light Terras RGB', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 42.0, 'core:OnOffState': 'on', 'core:LightIntensityState': 100, 'core:RedColorIntensityState': 255, 'core:GreenColorIntensityState': 254, 'core:BlueColorIntensityState': 252}
2020-06-19 15:49:43 WARNING (SyncWorker_9) [custom_components.tahoma.light] light states:
{'core:NameState': 'Paal Vijver', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 34.0, 'core:LightIntensityState': 0, 'core:OnOffState': 'off'}
2020-06-19 15:49:43 WARNING (SyncWorker_7) [custom_components.tahoma.light] light states:
{'core:NameState': 'Light Rechts', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 52.0, 'core:LightIntensityState': 0, 'core:OnOffState': 'off'}
2020-06-19 15:49:43 WARNING (SyncWorker_1) [custom_components.tahoma.light] light.turn_on kwargs: {'hs_color': (240.0, 85.71428571428571)}
2020-06-19 15:49:44 WARNING (SyncWorker_3) [custom_components.tahoma.light] light.turn_on kwargs: {'hs_color': (360.0, 85.71428571428571)}
2020-06-19 15:49:45 WARNING (SyncWorker_8) [custom_components.tahoma.light] light states:
{'core:NameState': 'Light Terras RGB', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 44.0, 'core:OnOffState': 'on', 'core:LightIntensityState': 100, 'core:RedColorIntensityState': 255, 'core:GreenColorIntensityState': 254, 'core:BlueColorIntensityState': 252}
2020-06-19 15:49:45 WARNING (SyncWorker_9) [custom_components.tahoma.light] light.turn_on kwargs: {'hs_color': (360.0, 100.0)}
2020-06-19 15:49:45 WARNING (SyncWorker_2) [custom_components.tahoma.light] light.turn_on kwargs: {'hs_color': (360.0, 100.0)}
2020-06-19 15:49:47 WARNING (SyncWorker_6) [custom_components.tahoma.light] light states:
{'core:NameState': 'Light Terras RGB', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 44.0, 'core:OnOffState': 'on', 'core:LightIntensityState': 100, 'core:RedColorIntensityState': 255, 'core:GreenColorIntensityState': 254, 'core:BlueColorIntensityState': 252}

Nothing for self._rgb

@vlebourl
Copy link
Collaborator

thank you, not surprising for self._rgb because we receiving hue saturation info instead of rgb. I wasn't expecting that. I just pushed a fix. Can you update and keep me posted?
cheers

@jurgen272
Copy link
Author

jurgen272 commented Jun 19, 2020

All ready a big thanks for your effort and quick responses.

Some more logs.
Errors are from when I tried changing the color with a custom HACS card (rgb-light-card)

2020-06-19 16:09:16 WARNING (SyncWorker_3) [custom_components.tahoma.light] light.turn_on kwargs: {'hs_color': (300.0, 50.196)}
2020-06-19 16:09:16 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140178125472912] color_hs_to_RGB() missing 1 required positional argument: 'iS'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service
    connection.context(msg),
  File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1295, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 209, in handle_service
    self._platforms.values(), func, call, required_features
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 454, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 597, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 485, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 242, in async_handle_light_on_service
    await light.async_turn_on(**params)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 622, in async_turn_on
    await self.hass.async_add_executor_job(ft.partial(self.turn_on, **kwargs))
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/tahoma/light.py", line 106, in turn_on
    rgb = color_util.color_hs_to_RGB(kwargs[ATTR_HS_COLOR])
TypeError: color_hs_to_RGB() missing 1 required positional argument: 'iS'
2020-06-19 16:09:18 WARNING (SyncWorker_7) [custom_components.tahoma.light] light.turn_on kwargs: {'hs_color': (194.737, 24.783)}
2020-06-19 16:09:18 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140178125472912] color_hs_to_RGB() missing 1 required positional argument: 'iS'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service
    connection.context(msg),
  File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1295, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 209, in handle_service
    self._platforms.values(), func, call, required_features
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 454, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 597, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 485, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 242, in async_handle_light_on_service
    await light.async_turn_on(**params)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 622, in async_turn_on
    await self.hass.async_add_executor_job(ft.partial(self.turn_on, **kwargs))
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/tahoma/light.py", line 106, in turn_on
    rgb = color_util.color_hs_to_RGB(kwargs[ATTR_HS_COLOR])
TypeError: color_hs_to_RGB() missing 1 required positional argument: 'iS'
2020-06-19 16:09:19 WARNING (SyncWorker_5) [custom_components.tahoma.light] light.turn_on kwargs: {'hs_color': (194.737, 24.783)}
2020-06-19 16:09:19 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140178125472912] color_hs_to_RGB() missing 1 required positional argument: 'iS'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service
    connection.context(msg),
  File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1295, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 209, in handle_service
    self._platforms.values(), func, call, required_features
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 454, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 597, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 485, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 242, in async_handle_light_on_service
    await light.async_turn_on(**params)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 622, in async_turn_on
    await self.hass.async_add_executor_job(ft.partial(self.turn_on, **kwargs))
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/tahoma/light.py", line 106, in turn_on
    rgb = color_util.color_hs_to_RGB(kwargs[ATTR_HS_COLOR])
TypeError: color_hs_to_RGB() missing 1 required positional argument: 'iS'
2020-06-19 16:09:19 WARNING (SyncWorker_1) [custom_components.tahoma.light] light.turn_on kwargs: {'hs_color': (194.737, 24.783)}
2020-06-19 16:09:19 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140178125472912] color_hs_to_RGB() missing 1 required positional argument: 'iS'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service
    connection.context(msg),
  File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1295, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 209, in handle_service
    self._platforms.values(), func, call, required_features
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 454, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 597, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 485, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 242, in async_handle_light_on_service
    await light.async_turn_on(**params)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 622, in async_turn_on
    await self.hass.async_add_executor_job(ft.partial(self.turn_on, **kwargs))
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/tahoma/light.py", line 106, in turn_on
    rgb = color_util.color_hs_to_RGB(kwargs[ATTR_HS_COLOR])
TypeError: color_hs_to_RGB() missing 1 required positional argument: 'iS'
2020-06-19 16:09:21 WARNING (SyncWorker_0) [custom_components.tahoma.light] light.turn_on kwargs: {'hs_color': (120.0, 39.496)}
2020-06-19 16:09:21 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140178125472912] color_hs_to_RGB() missing 1 required positional argument: 'iS'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service
    connection.context(msg),
  File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1295, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 209, in handle_service
    self._platforms.values(), func, call, required_features
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 454, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 597, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 485, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 242, in async_handle_light_on_service
    await light.async_turn_on(**params)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 622, in async_turn_on
    await self.hass.async_add_executor_job(ft.partial(self.turn_on, **kwargs))
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/tahoma/light.py", line 106, in turn_on
    rgb = color_util.color_hs_to_RGB(kwargs[ATTR_HS_COLOR])
TypeError: color_hs_to_RGB() missing 1 required positional argument: 'iS'
2020-06-19 16:09:23 WARNING (SyncWorker_6) [custom_components.tahoma.light] light.turn_on kwargs: {'hs_color': (120.0, 39.496)}
2020-06-19 16:09:23 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140178125472912] color_hs_to_RGB() missing 1 required positional argument: 'iS'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service
    connection.context(msg),
  File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1295, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 209, in handle_service
    self._platforms.values(), func, call, required_features
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 454, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 597, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 485, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 242, in async_handle_light_on_service
    await light.async_turn_on(**params)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 622, in async_turn_on
    await self.hass.async_add_executor_job(ft.partial(self.turn_on, **kwargs))
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/tahoma/light.py", line 106, in turn_on
    rgb = color_util.color_hs_to_RGB(kwargs[ATTR_HS_COLOR])
TypeError: color_hs_to_RGB() missing 1 required positional argument: 'iS'
2020-06-19 16:09:25 WARNING (SyncWorker_9) [custom_components.tahoma.light] light states:
{'core:NameState': 'Light Links', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 56.0, 'core:LightIntensityState': 0, 'core:OnOffState': 'off'}
2020-06-19 16:09:25 WARNING (SyncWorker_9) [custom_components.tahoma.light] light states:
{'core:NameState': 'Paal Living', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 36.0, 'core:LightIntensityState': 0, 'core:OnOffState': 'off'}
2020-06-19 16:09:25 WARNING (SyncWorker_7) [custom_components.tahoma.light] light states:
{'core:NameState': 'Paal Buren', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 38.0, 'core:LightIntensityState': 0, 'core:OnOffState': 'off'}
2020-06-19 16:09:25 WARNING (SyncWorker_8) [custom_components.tahoma.light] light states:
{'core:NameState': 'Light Terras RGB', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 38.0, 'core:OnOffState': 'on', 'core:LightIntensityState': 55, 'core:RedColorIntensityState': 115, 'core:GreenColorIntensityState': 140, 'core:BlueColorIntensityState': 0}
2020-06-19 16:09:25 WARNING (SyncWorker_2) [custom_components.tahoma.light] light states:
{'core:NameState': 'Paal Vijver', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 34.0, 'core:LightIntensityState': 0, 'core:OnOffState': 'off'}
2020-06-19 16:09:26 WARNING (SyncWorker_1) [custom_components.tahoma.light] light states:
{'core:NameState': 'Light Rechts', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 56.0, 'core:LightIntensityState': 0, 'core:OnOffState': 'off'}
2020-06-19 16:09:27 WARNING (SyncWorker_3) [custom_components.tahoma.light] light.turn_on kwargs: {'brightness': 255}
2020-06-19 16:09:30 WARNING (SyncWorker_0) [custom_components.tahoma.light] light states:
{'core:NameState': 'Light Terras RGB', 'core:PriorityLockTimerState': 0, 'core:StatusState': 'available', 'core:RSSILevelState': 40.0, 'core:OnOffState': 'on', 'core:LightIntensityState': 100, 'core:RedColorIntensityState': 210, 'core:GreenColorIntensityState': 255, 'core:BlueColorIntensityState': 0}

@vlebourl
Copy link
Collaborator

stupid typo on my side... fix pushed!

@jurgen272
Copy link
Author

It is working now.
Many thanks for the quick solution !!!

@vlebourl
Copy link
Collaborator

great, we'll include that in the next stable release. stay on this branch in the meanwhile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request platform: light
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants