update file header
This commit is contained in:
parent
caecca7e1f
commit
5fa34b10b3
1 changed files with 16 additions and 9 deletions
|
@ -1,17 +1,24 @@
|
||||||
"""
|
"""
|
||||||
homeassistant.components.sensor.rfxtrx
|
homeassistant.components.sensor.rfxtrx
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
Shows sensor values from rfxtrx sensors.
|
Shows sensor values from RFXtrx sensors.
|
||||||
|
|
||||||
Possible config keys:
|
Configuration:
|
||||||
device="path to rfxtrx device"
|
To use the rfxtrx sensors you will need to add something like the following to
|
||||||
|
your config/configuration.yaml
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
sensor 2:
|
sensor:
|
||||||
platform: rfxtrx
|
platform: rfxtrx
|
||||||
device : /dev/serial/by-id/usb-RFXCOM_RFXtrx433_A1Y0NJGR-if00-port0
|
device: PATH_TO_DEVICE
|
||||||
|
|
||||||
|
Variables:
|
||||||
|
|
||||||
|
device
|
||||||
|
*Required
|
||||||
|
Path to your RFXtrx device.
|
||||||
|
E.g. /dev/serial/by-id/usb-RFXCOM_RFXtrx433_A1Y0NJGR-if00-port0
|
||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
@ -31,7 +38,7 @@ DATA_TYPES = OrderedDict([
|
||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||||
""" Setup the rfxtrx platform. """
|
""" Setup the RFXtrx platform. """
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
sensors = {} # keep track of sensors added to HA
|
sensors = {} # keep track of sensors added to HA
|
||||||
|
@ -57,7 +64,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||||
|
|
||||||
|
|
||||||
class RfxtrxSensor(Entity):
|
class RfxtrxSensor(Entity):
|
||||||
""" Represents a Rfxtrx Sensor. """
|
""" Represents a RFXtrx sensor. """
|
||||||
|
|
||||||
def __init__(self, event):
|
def __init__(self, event):
|
||||||
self.event = event
|
self.event = event
|
||||||
|
|
Loading…
Add table
Reference in a new issue