Skip to content

Fixed rfxtrx binary sensor missing optional keyerror data_bits#12789

Merged
balloob merged 1 commit intohome-assistant:devfrom
basschipper:fixed-binsensor-rfxtrx
Feb 28, 2018
Merged

Fixed rfxtrx binary sensor missing optional keyerror data_bits#12789
balloob merged 1 commit intohome-assistant:devfrom
basschipper:fixed-binsensor-rfxtrx

Conversation

@basschipper
Copy link
Copy Markdown
Contributor

@basschipper basschipper commented Feb 28, 2018

Description:

Fixed rfxtrx binary sensor missing optional keyerror data_bits

2018-02-28 11:24:30 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up platform rfxtrx
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 84, in async_setup
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 243, in result
    raise self._exception
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/binary_sensor/rfxtrx.py", line 58, in setup_platform
    if entity[CONF_DATA_BITS] is not None:
KeyError: 'data_bits' 

Related issue (if applicable): fixes #12776

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>

Example entry for configuration.yaml (if applicable):

binary_sensor:
  - platform: rfxtrx
    devices:
      0b110001008744e10a000070:
        name: Mailbox
        device_class: opening

Checklist:

  • The code change is tested and works locally.

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

If the code communicates with devices, web services, or third-party tools:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • Tests have been added to verify that the new code works.

@basschipper
Copy link
Copy Markdown
Contributor Author

Fixes #12776 / #12688, probably introduced by #12463.

@balloob balloob added this to the 0.64.2 milestone Feb 28, 2018
@balloob
Copy link
Copy Markdown
Member

balloob commented Feb 28, 2018

Thanks! Sorry about introducing the issue 🤔 Will make it part of the next hotfix 🎉

@balloob balloob merged commit b556b86 into home-assistant:dev Feb 28, 2018
@balloob balloob mentioned this pull request Mar 1, 2018
@basschipper basschipper deleted the fixed-binsensor-rfxtrx branch March 10, 2018 09:43
@home-assistant home-assistant locked and limited conversation to collaborators Jul 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Binary sensor rfxtrx broken in 0.64.1

3 participants