mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 05:47:10 +00:00
Move configuration details to docs and add link
This commit is contained in:
parent
e23db5d972
commit
0bb63bf3f0
@ -1,22 +1,10 @@
|
|||||||
"""
|
"""
|
||||||
Networx NX584 interface
|
homeassistant.components.alarm_control_panel.nx584
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
Support for NX584 alarm control panels.
|
||||||
|
|
||||||
Configuration:
|
For more details about this platform, please refer to the documentation at
|
||||||
|
https://home-assistant.io/components/alarm_control_panel.nx584/
|
||||||
To use the Example custom component you will need to add the following to
|
|
||||||
your configuration.yaml file.
|
|
||||||
|
|
||||||
alarm_control_panel:
|
|
||||||
platform: nx584
|
|
||||||
host: localhost:5007
|
|
||||||
|
|
||||||
Variable:
|
|
||||||
|
|
||||||
host
|
|
||||||
*Optional
|
|
||||||
HOST should be a something like "localhost:5007" which is the
|
|
||||||
connection information for talking to the pynx584 backend server.
|
|
||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
import requests
|
import requests
|
||||||
@ -57,18 +45,22 @@ class NX584Alarm(alarm.AlarmControlPanel):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def should_poll(self):
|
def should_poll(self):
|
||||||
|
""" Polling needed. """
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
|
""" Returns the name of the device. """
|
||||||
return self._name
|
return self._name
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def code_format(self):
|
def code_format(self):
|
||||||
|
""" Characters if code is defined. """
|
||||||
return '[0-9]{4}([0-9]{2})?'
|
return '[0-9]{4}([0-9]{2})?'
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def state(self):
|
def state(self):
|
||||||
|
""" Returns the state of the device. """
|
||||||
try:
|
try:
|
||||||
part = self._alarm.list_partitions()[0]
|
part = self._alarm.list_partitions()[0]
|
||||||
zones = self._alarm.list_zones()
|
zones = self._alarm.list_zones()
|
||||||
@ -97,13 +89,17 @@ class NX584Alarm(alarm.AlarmControlPanel):
|
|||||||
return STATE_ALARM_ARMED_AWAY
|
return STATE_ALARM_ARMED_AWAY
|
||||||
|
|
||||||
def alarm_disarm(self, code=None):
|
def alarm_disarm(self, code=None):
|
||||||
|
""" Send disarm command. """
|
||||||
self._alarm.disarm(code)
|
self._alarm.disarm(code)
|
||||||
|
|
||||||
def alarm_arm_home(self, code=None):
|
def alarm_arm_home(self, code=None):
|
||||||
|
""" Send arm home command. """
|
||||||
self._alarm.arm('home')
|
self._alarm.arm('home')
|
||||||
|
|
||||||
def alarm_arm_away(self, code=None):
|
def alarm_arm_away(self, code=None):
|
||||||
|
""" Send arm away command. """
|
||||||
self._alarm.arm('auto')
|
self._alarm.arm('auto')
|
||||||
|
|
||||||
def alarm_trigger(self, code=None):
|
def alarm_trigger(self, code=None):
|
||||||
|
""" Alarm trigger command. """
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user