Skip to content

Add support for defining custom effect for Flux Led#19072

Merged
Danielhiversen merged 1 commit into
home-assistant:devfrom
leppa:flux_led
Feb 6, 2019
Merged

Add support for defining custom effect for Flux Led#19072
Danielhiversen merged 1 commit into
home-assistant:devfrom
leppa:flux_led

Conversation

@leppa
Copy link
Copy Markdown
Contributor

@leppa leppa commented Dec 6, 2018

Description:

Flux Led controllers support defining a custom effect. User may define up to 16 colors, speed of switching between them, and transition type.

Additional changes:

  • add support for reporting currently running effect on the controller.

  • make effects list sorted, so it's easier to find specific effect in
    the list.

Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#7755

Example entry for configuration.yaml (if applicable):

- platform: flux_led
  devices:
    192.168.1.22:
      custom_effect:
        speed_pct: 75
        transition: 'strobe'
        colors:
          - [255,0,0]
          - [127,127,0]
          - [0,255,0]
          - [0,127,127]
          - [0,0,255]
          - [127,0,127]

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:

Flux Led controllers support defining a custom effect. User may define
up to 16 colors, speed of switching between them, and transition type.

Additional changes:

 - add support for reporting currently running effect on the controller.

 - make effects list sorted, so it's easier to find specific effect in
   the list.
@fabaff fabaff changed the title Flux Led: Add support for defining custom effect Add support for defining custom effect for Flux Led Dec 7, 2018
@Danielhiversen Danielhiversen merged commit 574823f into home-assistant:dev Feb 6, 2019
@ghost ghost removed the in progress label Feb 6, 2019
bachya pushed a commit to bachya/home-assistant that referenced this pull request Feb 7, 2019
Flux Led controllers support defining a custom effect. User may define
up to 16 colors, speed of switching between them, and transition type.

Additional changes:

 - add support for reporting currently running effect on the controller.

 - make effects list sorted, so it's easier to find specific effect in
   the list.
sjabby added a commit to sjabby/home-assistant that referenced this pull request Feb 18, 2019
PR home-assistant#19072 introduced the custom_effect feature but it didnt make it optional as the documentation states.
This causes error on startup and the component does not work.
```
Error while setting up platform flux_led
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
    return fut.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/light/flux_led.py", line 135, in setup_platform
    device[CONF_CUSTOM_EFFECT] = device_config[CONF_CUSTOM_EFFECT]
KeyError: 'custom_effect'
```

Changing this line to make the custom_effect optional as the original intention.
@sjabby sjabby mentioned this pull request Feb 18, 2019
9 tasks
balloob pushed a commit that referenced this pull request Feb 18, 2019
* Fix for #19072

PR #19072 introduced the custom_effect feature but it didnt make it optional as the documentation states.
This causes error on startup and the component does not work.
```
Error while setting up platform flux_led
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
    return fut.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/light/flux_led.py", line 135, in setup_platform
    device[CONF_CUSTOM_EFFECT] = device_config[CONF_CUSTOM_EFFECT]
KeyError: 'custom_effect'
```

Changing this line to make the custom_effect optional as the original intention.

* Update flux_led.py
balloob pushed a commit that referenced this pull request Feb 18, 2019
* Fix for #19072

PR #19072 introduced the custom_effect feature but it didnt make it optional as the documentation states.
This causes error on startup and the component does not work.
```
Error while setting up platform flux_led
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
    return fut.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/light/flux_led.py", line 135, in setup_platform
    device[CONF_CUSTOM_EFFECT] = device_config[CONF_CUSTOM_EFFECT]
KeyError: 'custom_effect'
```

Changing this line to make the custom_effect optional as the original intention.

* Update flux_led.py
@balloob balloob mentioned this pull request Feb 20, 2019
@leppa leppa deleted the flux_led branch August 13, 2020 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants