mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 18:27:09 +00:00
Add STATE_OPEN/STATE_CLOSED to groupable states
This commit is contained in:
parent
9bdfa89b7c
commit
33028dd143
@ -12,7 +12,8 @@ from homeassistant.helpers.entity import Entity
|
|||||||
import homeassistant.util as util
|
import homeassistant.util as util
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
ATTR_ENTITY_ID, STATE_ON, STATE_OFF,
|
ATTR_ENTITY_ID, STATE_ON, STATE_OFF,
|
||||||
STATE_HOME, STATE_NOT_HOME, STATE_UNKNOWN)
|
STATE_HOME, STATE_NOT_HOME, STATE_OPEN, STATE_CLOSED,
|
||||||
|
STATE_UNKNOWN)
|
||||||
|
|
||||||
DOMAIN = "group"
|
DOMAIN = "group"
|
||||||
DEPENDENCIES = []
|
DEPENDENCIES = []
|
||||||
@ -22,7 +23,8 @@ ENTITY_ID_FORMAT = DOMAIN + ".{}"
|
|||||||
ATTR_AUTO = "auto"
|
ATTR_AUTO = "auto"
|
||||||
|
|
||||||
# List of ON/OFF state tuples for groupable states
|
# List of ON/OFF state tuples for groupable states
|
||||||
_GROUP_TYPES = [(STATE_ON, STATE_OFF), (STATE_HOME, STATE_NOT_HOME)]
|
_GROUP_TYPES = [(STATE_ON, STATE_OFF), (STATE_HOME, STATE_NOT_HOME),
|
||||||
|
(STATE_OPEN, STATE_CLOSED)]
|
||||||
|
|
||||||
|
|
||||||
def _get_group_on_off(state):
|
def _get_group_on_off(state):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user