Add open
state to LockEntity (#111968)
* Add `open` state to LockEntity * Add tests * Fixes * Fix tests * strings and icons * Adjust demo open lock * Fix lock and tests * fix import * Fix strings * mute ruff * Change sequence * Sequence2 * Group on states * Fix ruff * Fix tests * Add more test cases * Sorting
This commit is contained in:
parent
189c07d502
commit
7862596ef3
18 changed files with 377 additions and 37 deletions
|
@ -2,7 +2,14 @@
|
|||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from homeassistant.const import STATE_LOCKED, STATE_UNLOCKED
|
||||
from homeassistant.const import (
|
||||
STATE_LOCKED,
|
||||
STATE_LOCKING,
|
||||
STATE_OPEN,
|
||||
STATE_OPENING,
|
||||
STATE_UNLOCKED,
|
||||
STATE_UNLOCKING,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
|
||||
from .const import DOMAIN
|
||||
|
@ -16,4 +23,15 @@ def async_describe_on_off_states(
|
|||
hass: HomeAssistant, registry: "GroupIntegrationRegistry"
|
||||
) -> None:
|
||||
"""Describe group on off states."""
|
||||
registry.on_off_states(DOMAIN, {STATE_UNLOCKED}, STATE_UNLOCKED, STATE_LOCKED)
|
||||
registry.on_off_states(
|
||||
DOMAIN,
|
||||
{
|
||||
STATE_LOCKING,
|
||||
STATE_OPEN,
|
||||
STATE_OPENING,
|
||||
STATE_UNLOCKED,
|
||||
STATE_UNLOCKING,
|
||||
},
|
||||
STATE_UNLOCKED,
|
||||
STATE_LOCKED,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue