Add MQTT object_id option (#58728)
* Add MQTT object_id option * Add MQTT object_id option * Add MQTT object_id option * Add MQTT object_id option - Fix light and vacuum * Add MQTT object_id option - Fix light and vacuum * Add MQTT object_id option - Fix lock * Add MQTT object_id option - Fix device * Add MQTT object_id option - Fix device * Update tests/components/mqtt/test_discovery.py Co-authored-by: Erik Montnemery <erik@montnemery.com> * Change deprecated method Co-authored-by: Erik Montnemery <erik@montnemery.com>
This commit is contained in:
parent
5151c4d99b
commit
67c2747027
26 changed files with 232 additions and 6 deletions
|
@ -29,6 +29,7 @@ from homeassistant.components.light import (
|
|||
COLOR_MODE_UNKNOWN,
|
||||
COLOR_MODE_WHITE,
|
||||
COLOR_MODE_XY,
|
||||
ENTITY_ID_FORMAT,
|
||||
SUPPORT_BRIGHTNESS,
|
||||
SUPPORT_COLOR,
|
||||
SUPPORT_COLOR_TEMP,
|
||||
|
@ -239,6 +240,7 @@ async def async_setup_entity_basic(
|
|||
class MqttLight(MqttEntity, LightEntity, RestoreEntity):
|
||||
"""Representation of a MQTT light."""
|
||||
|
||||
_entity_id_format = ENTITY_ID_FORMAT
|
||||
_attributes_extra_blocked = MQTT_LIGHT_ATTRIBUTES_BLOCKED
|
||||
|
||||
def __init__(self, hass, config, config_entry, discovery_data):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue