mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 08:17:08 +00:00
revert update of input_boolean
This commit is contained in:
parent
4a5a1e1e96
commit
c3ea04f2dd
@ -12,7 +12,7 @@ from homeassistant.const import (
|
|||||||
ATTR_ENTITY_ID, CONF_ICON, CONF_NAME, SERVICE_TURN_OFF, SERVICE_TURN_ON,
|
ATTR_ENTITY_ID, CONF_ICON, CONF_NAME, SERVICE_TURN_OFF, SERVICE_TURN_ON,
|
||||||
SERVICE_TOGGLE, STATE_ON)
|
SERVICE_TOGGLE, STATE_ON)
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.entity import ToggleEntity, generate_entity_id
|
from homeassistant.helpers.entity import ToggleEntity
|
||||||
from homeassistant.helpers.entity_component import EntityComponent
|
from homeassistant.helpers.entity_component import EntityComponent
|
||||||
|
|
||||||
DOMAIN = 'input_boolean'
|
DOMAIN = 'input_boolean'
|
||||||
@ -103,7 +103,7 @@ class InputBoolean(ToggleEntity):
|
|||||||
|
|
||||||
def __init__(self, object_id, name, state, icon):
|
def __init__(self, object_id, name, state, icon):
|
||||||
"""Initialize a boolean input."""
|
"""Initialize a boolean input."""
|
||||||
self.entity_id = generate_entity_id(ENTITY_ID_FORMAT, object_id)
|
self.entity_id = ENTITY_ID_FORMAT.format(object_id)
|
||||||
self._name = name
|
self._name = name
|
||||||
self._state = state
|
self._state = state
|
||||||
self._icon = icon
|
self._icon = icon
|
||||||
|
Loading…
x
Reference in New Issue
Block a user