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 defining custom effect for Flux Led #19072

Merged
merged 1 commit into from Feb 6, 2019

Conversation

Projects
None yet
3 participants
@leppa
Copy link
Contributor

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:

@wafflebot wafflebot bot added the in progress label Dec 6, 2018

@leppa leppa referenced this pull request Dec 6, 2018

Merged

Update Flux Led documentation #7755

2 of 2 tasks complete
Flux Led: Add support for defining custom effect
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.

@leppa leppa force-pushed the leppa:flux_led branch from 12f8309 to 084b753 Dec 6, 2018

@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

5 checks passed

Hound No violations found. Woof!
WIP Legacy commit status override — see details
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 92.927%
Details

@wafflebot wafflebot bot removed the in progress label Feb 6, 2019

bachya added a commit to bachya/home-assistant that referenced this pull request Feb 7, 2019

Flux Led: Add support for defining custom effect (home-assistant#19072)
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

Fix for home-assistant#19072
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 referenced this pull request Feb 18, 2019

Merged

Fix for #19072 #21175

3 of 9 tasks complete

balloob added a commit that referenced this pull request Feb 18, 2019

Fix for #19072 (#21175)
* 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 added a commit that referenced this pull request Feb 18, 2019

Fix for #19072 (#21175)
* 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 referenced this pull request Feb 20, 2019

Merged

0.88.0 #21238

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.