Rename AlarmControlPanel to AlarmControlPanelEntity (#474)

This commit is contained in:
Erik Montnemery 2020-04-25 18:20:40 +02:00 committed by GitHub
parent 93387a520d
commit 33028ce8f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,8 @@ sidebar_label: Alarm Control Panel
This entry is incomplete. Contribution welcome. This entry is incomplete. Contribution welcome.
::: :::
An alarm control panel entity controls an alarm. Derive a platform entity from [`homeassistant.components.alarm_control_panel.AlarmControlPanelEntity`](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/alarm_control_panel/__init__.py).
## Properties ## Properties
:::tip :::tip
@ -50,7 +52,7 @@ Properties should always only return information from memory and not do I/O (lik
Send disarm command. Send disarm command.
```python ```python
class MyAlarm(AlarmControlPanel): class MyAlarm(AlarmControlPanelEntity):
# Implement one of these methods. # Implement one of these methods.
def alarm_disarm(self, code=None) -> None: def alarm_disarm(self, code=None) -> None:
@ -64,7 +66,7 @@ class MyAlarm(AlarmControlPanel):
Send arm home command. Send arm home command.
```python ```python
class MyAlarm(AlarmControlPanel): class MyAlarm(AlarmControlPanelEntity):
# Implement one of these methods. # Implement one of these methods.
def alarm_arm_home(self, code=None) -> None: def alarm_arm_home(self, code=None) -> None:
@ -78,7 +80,7 @@ class MyAlarm(AlarmControlPanel):
Send arm away command. Send arm away command.
```python ```python
class MyAlarm(AlarmControlPanel): class MyAlarm(AlarmControlPanelEntity):
# Implement one of these methods. # Implement one of these methods.
def alarm_arm_away(self, code=None) -> None: def alarm_arm_away(self, code=None) -> None:
@ -92,7 +94,7 @@ class MyAlarm(AlarmControlPanel):
Send arm night command. Send arm night command.
```python ```python
class MyAlarm(AlarmControlPanel): class MyAlarm(AlarmControlPanelEntity):
# Implement one of these methods. # Implement one of these methods.
def alarm_arm_night(self, code=None) -> None: def alarm_arm_night(self, code=None) -> None:
@ -106,7 +108,7 @@ class MyAlarm(AlarmControlPanel):
Send alarm trigger command. Send alarm trigger command.
```python ```python
class MyAlarm(AlarmControlPanel): class MyAlarm(AlarmControlPanelEntity):
# Implement one of these methods. # Implement one of these methods.
def alarm_trigger(self, code=None) -> None: def alarm_trigger(self, code=None) -> None:
@ -120,7 +122,7 @@ class MyAlarm(AlarmControlPanel):
Send arm custom bypass command. Send arm custom bypass command.
```python ```python
class MyAlarm(AlarmControlPanel): class MyAlarm(AlarmControlPanelEntity):
# Implement one of these methods. # Implement one of these methods.
def alarm_arm_custom_bypass(self, code=None) -> None: def alarm_arm_custom_bypass(self, code=None) -> None: