mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Zwave Node attributes was missing from binary sensors. (#2516)
Fixes #2505
This commit is contained in:
parent
2900855061
commit
82d98f5b89
@ -8,6 +8,7 @@ import logging
|
|||||||
import datetime
|
import datetime
|
||||||
import homeassistant.util.dt as dt_util
|
import homeassistant.util.dt as dt_util
|
||||||
from homeassistant.helpers.event import track_point_in_time
|
from homeassistant.helpers.event import track_point_in_time
|
||||||
|
from homeassistant.helpers.entity import Entity
|
||||||
from homeassistant.components import zwave
|
from homeassistant.components import zwave
|
||||||
from homeassistant.components.binary_sensor import (
|
from homeassistant.components.binary_sensor import (
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
@ -61,7 +62,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
add_devices([ZWaveBinarySensor(value, None)])
|
add_devices([ZWaveBinarySensor(value, None)])
|
||||||
|
|
||||||
|
|
||||||
class ZWaveBinarySensor(BinarySensorDevice, zwave.ZWaveDeviceEntity):
|
class ZWaveBinarySensor(BinarySensorDevice, zwave.ZWaveDeviceEntity, Entity):
|
||||||
"""Representation of a binary sensor within Z-Wave."""
|
"""Representation of a binary sensor within Z-Wave."""
|
||||||
|
|
||||||
def __init__(self, value, sensor_class):
|
def __init__(self, value, sensor_class):
|
||||||
@ -97,7 +98,7 @@ class ZWaveBinarySensor(BinarySensorDevice, zwave.ZWaveDeviceEntity):
|
|||||||
self.update_ha_state()
|
self.update_ha_state()
|
||||||
|
|
||||||
|
|
||||||
class ZWaveTriggerSensor(ZWaveBinarySensor):
|
class ZWaveTriggerSensor(ZWaveBinarySensor, Entity):
|
||||||
"""Representation of a stateless sensor within Z-Wave."""
|
"""Representation of a stateless sensor within Z-Wave."""
|
||||||
|
|
||||||
def __init__(self, sensor_value, sensor_class, hass, re_arm_sec=60):
|
def __init__(self, sensor_value, sensor_class, hass, re_arm_sec=60):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user