Add mysensors binary sensor

* Add mysensors binary sensor.
* Add discovery platforms to binary_sensor base component.
* Replace device_state_attributes with state_attributes in
	binary_sensor base class.
* Fix docstrings.
* Add discovery of binary sensor to mysensors component.
* Add child.type as argument to mysensors device_class.
* Move binary sensor types from sensor to binary_sensor module.
* Fix binary_sensor attribute tests. Use state_attributes instead of
	device_state_attributes.
This commit is contained in:
MartinHjelmare 2016-02-20 03:59:06 +01:00
parent 2d0721abe8
commit 08aaea5444
7 changed files with 200 additions and 21 deletions

View file

@ -52,7 +52,8 @@ class MySensorsSwitch(SwitchDevice):
# pylint: disable=too-many-arguments
def __init__(self, gateway, node_id, child_id, name, value_type):
def __init__(
self, gateway, node_id, child_id, name, value_type, child_type):
"""Setup class attributes on instantiation.
Args:
@ -61,6 +62,7 @@ class MySensorsSwitch(SwitchDevice):
child_id (str): Id of child.
name (str): Entity name.
value_type (str): Value type of child. Value is entity state.
child_type (str): Child type of child.
Attributes:
gateway (GatewayWrapper): Gateway object