mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-10 02:46:29 +00:00
Update entity_alarm_control_panel.md (#181)
* Update entity_alarm_control_panel.md * Update entity_alarm_control_panel.md * Update entity_alarm_control_panel.md * Update entity_alarm_control_panel.md
This commit is contained in:
parent
474125b182
commit
2f97575f39
@ -11,9 +11,27 @@ sidebar_label: Alarm Control Panel
|
||||
|
||||
| Name | Type | Default | Description
|
||||
| ---- | ---- | ------- | -----------
|
||||
| code_format | string | `None` | The format of the panel code.
|
||||
| state | string | **Required** | One of the states listed in the **states** section.
|
||||
| code_format | string | `None` | One of the states listed in the **code formats** section.
|
||||
| changed_by | string | `None` | Last change triggered by.
|
||||
|
||||
### Available code formats
|
||||
|
||||
### States
|
||||
|
||||
| Value | Description
|
||||
| ----- | -----------
|
||||
| `disarmed` | The alarm is disarmed (`off`).
|
||||
| `armed_home` | The alarm is armed in home mode.
|
||||
| `armed_away` | The alarm is armed in away mode.
|
||||
| `armed_night` | The alarm is armed in night mode.
|
||||
| `armed_custom_bypass` | The alarm is armed in bypass mode.
|
||||
| `pending` | The alarm is pending (towards `triggered`).
|
||||
| `arming` | The alarm is arming.
|
||||
| `disarming` | The alarm is disarming.
|
||||
| `triggered` | The alarm is triggered.
|
||||
|
||||
|
||||
### Code Formats
|
||||
|
||||
| Value | Description
|
||||
| ----- | -----------
|
||||
@ -21,5 +39,89 @@ sidebar_label: Alarm Control Panel
|
||||
| Number | Code is a number (Shows ten-key pad on frontend).
|
||||
| Any | Code is a string.
|
||||
|
||||
|
||||
## Methods
|
||||
|
||||
### Alarm Disarm
|
||||
Send disarm command.
|
||||
|
||||
```python
|
||||
class MyAlarm(AlarmControlPanel):
|
||||
# Implement one of these methods.
|
||||
|
||||
def alarm_disarm(self, code=None) -> None:
|
||||
"""Send disarm command."""
|
||||
|
||||
async def async_alarm_disarm(self, code=None) -> None:
|
||||
"""Send disarm command."""
|
||||
```
|
||||
|
||||
### Alarm Arm Home
|
||||
Send arm home command.
|
||||
|
||||
```python
|
||||
class MyAlarm(AlarmControlPanel):
|
||||
# Implement one of these methods.
|
||||
|
||||
def alarm_arm_home(self, code=None) -> None:
|
||||
"""Send arm home command."""
|
||||
|
||||
def async_alarm_arm_home(self, code=None) -> None:
|
||||
"""Send arm home command."""
|
||||
```
|
||||
|
||||
### Alarm Arm Away
|
||||
Send arm away command.
|
||||
|
||||
```python
|
||||
class MyAlarm(AlarmControlPanel):
|
||||
# Implement one of these methods.
|
||||
|
||||
def alarm_arm_away(self, code=None) -> None:
|
||||
"""Send arm away command."""
|
||||
|
||||
def async_alarm_arm_away(self, code=None) -> None:
|
||||
"""Send arm away command."""
|
||||
```
|
||||
|
||||
### Alarm Arm Night
|
||||
Send arm night command.
|
||||
|
||||
```python
|
||||
class MyAlarm(AlarmControlPanel):
|
||||
# Implement one of these methods.
|
||||
|
||||
def alarm_arm_night(self, code=None) -> None:
|
||||
"""Send arm night command."""
|
||||
|
||||
def async_alarm_arm_night(self, code=None) -> None:
|
||||
"""Send arm night command."""
|
||||
```
|
||||
|
||||
### Alarm Trigger
|
||||
Send alarm trigger command.
|
||||
|
||||
```python
|
||||
class MyAlarm(AlarmControlPanel):
|
||||
# Implement one of these methods.
|
||||
|
||||
def alarm_trigger(self, code=None) -> None:
|
||||
"""Send alarm trigger command."""
|
||||
|
||||
def async_alarm_trigger(self, code=None) -> None:
|
||||
"""Send alarm trigger command."""
|
||||
```
|
||||
|
||||
### Alarm Custom Bypass
|
||||
Send arm custom bypass command.
|
||||
|
||||
```python
|
||||
class MyAlarm(AlarmControlPanel):
|
||||
# Implement one of these methods.
|
||||
|
||||
def alarm_arm_custom_bypass(self, code=None) -> None:
|
||||
"""Send arm custom bypass command."""
|
||||
|
||||
def async_alarm_arm_custom_bypass(self, code=None) -> None:
|
||||
"""Send arm custom bypass command."""
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user