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

Fixed rfxtrx binary_sensor KeyError on missing optional device_class #11925

Merged
merged 2 commits into from
Jan 26, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions homeassistant/components/binary_sensor/rfxtrx.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from homeassistant.components import rfxtrx
from homeassistant.components.binary_sensor import (
PLATFORM_SCHEMA, BinarySensorDevice)
PLATFORM_SCHEMA, DEVICE_CLASSES_SCHEMA, BinarySensorDevice)
from homeassistant.components.rfxtrx import (
ATTR_NAME, CONF_AUTOMATIC_ADD, CONF_DATA_BITS, CONF_DEVICES,
CONF_FIRE_EVENT, CONF_OFF_DELAY)
Expand All @@ -29,7 +29,7 @@
vol.Optional(CONF_DEVICES, default={}): {
cv.string: vol.Schema({
vol.Optional(CONF_NAME, default=None): cv.string,
vol.Optional(CONF_DEVICE_CLASS, default=None): cv.string,
vol.Optional(CONF_DEVICE_CLASS, default=None): DEVICE_CLASSES_SCHEMA,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (81 > 79 characters)

vol.Optional(CONF_FIRE_EVENT, default=False): cv.boolean,
vol.Optional(CONF_OFF_DELAY, default=None):
vol.Any(cv.time_period, cv.positive_timedelta),
Expand Down
1 change: 0 additions & 1 deletion homeassistant/components/rfxtrx.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
CONF_DATA_TYPE = 'data_type'
CONF_SIGNAL_REPETITIONS = 'signal_repetitions'
CONF_FIRE_EVENT = 'fire_event'
CONF_DATA_BITS = 'data_bits'
CONF_DUMMY = 'dummy'
CONF_DEVICE = 'device'
CONF_DEBUG = 'debug'
Expand Down