8000 Pilight switch regression due to voluptuous changes · Issue #4272 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Pilight switch regression due to voluptuous changes #4272

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

Closed
DavidLP opened this issue Nov 7, 2016 · 3 comments · Fixed by #4273
Closed

Pilight switch regression due to voluptuous changes #4272

DavidLP opened this issue Nov 7, 2016 · 3 comments · Fixed by #4273

Comments

@DavidLP
Copy link
Contributor
DavidLP commented Nov 7, 2016

Home Assistant release (hass --version):
0.33.0.dev0

Python release (python3 --version):
Python 3.5.2 :: Continuum Analytics, Inc.

Component/platform:
pilight/switch

Description of problem:
The pilight configuration is checked via voluptuous since #3819.
This unfortunately created a regression because the configuration
items: CONF_ON_CODE_RECIEVE and CONF_OFF_CODE_RECIEVE
can be None making this check fail:
if any(self._code_on_receive) or any(self._code_off_receive):

with the following error message

16-11-06 11:30:35 homeassistant.components.switch: Error while setting up platform pilight
Traceback (most recent call last):
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 148, in _async_setup_platform
    entity_platform.add_entities, discovery_info
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/switch/pilight.py", line 63, in setup_platform
    properties.get(CONF_OFF_CODE_RECIEVE)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/switch/pilight.py", line 84, in __init__
    if any(self._code_on_receive) or any(self._code_off_receive):
TypeError: 'NoneType' object is not iterable

Additional info:
The issue was reported in the forum.

balloob pushed a commit that referenced this issue Nov 7, 2016
balloob pushed a commit that referenced this issue Nov 7, 2016
@kolossboss
Copy link

Sorry not working for me in 0.32.2. I see the toggle but nothing happened if I switch on/off.

Thats the log
16-11-06 14:04:51 homeassistant.components.switch: Error while setting up platform pilight Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 148, in _async_setup_platform entity_platform.add_entities, discovery_info File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/futures.py", line 361, in __iter__ yield self # This tells Task to wait for completion. File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/tasks.py", line 296, in _wakeup future.result() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/futures.py", line 274, in result raise self._exception File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/concurrent/futures/thread.py", line 55, in run result = self.fn(*self.args, **self.kwargs) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/homeassistant/components/switch/pilight.py", line 63, in setup_platform properties.get(CONF_OFF_CODE_RECIEVE) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/homeassistant/components/switch/pilight.py", line 84, in __init__ if any(self._code_on_receive) or any(self._code_off_receive): TypeError: 'NoneType' object is not iterable

Thats my config:

- platform: pilight
  switches:
    Ambilight:
      on_code:
        protocol: kaku_switch
        unit: 3
        id: 19608594
        'on': 1
      off_code:
        protocol: kaku_switch
        unit: 3
        id: 19608594
        'off': 1
#      on_code_receive:
#        protocol: daycom
#        unit: 3
#        id: 19608594
#        state: 'on'
#      off_code_receive:
#        protocol: daycom
#        unit: 3
#        id: 19608594
#        state: 'off'

@DavidLP
Copy link
Contributor Author
DavidLP commented Nov 7, 2016

Sure you have the newest version 0.32.2?

@kolossboss
Copy link
kolossboss commented Nov 7, 2016

Home-Assistant says yes.
Do I need to update any other pip packages manually?

@home-assistant home-assistant locked and limited conversation to collaborators Mar 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0