mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 01:38:02 +00:00
Explicitly opt-in to device name in the demo integration (#94647)
This commit is contained in:
parent
3ee63ba2c2
commit
43c4dec3ed
@ -38,6 +38,7 @@ class DemoBinarySensor(BinarySensorEntity):
|
||||
"""representation of a Demo binary sensor."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
_attr_should_poll = False
|
||||
|
||||
def __init__(
|
||||
@ -49,7 +50,6 @@ class DemoBinarySensor(BinarySensorEntity):
|
||||
) -> None:
|
||||
"""Initialize the demo sensor."""
|
||||
self._unique_id = unique_id
|
||||
self._attr_name = None
|
||||
self._state = state
|
||||
self._attr_device_class = device_class
|
||||
self._attr_device_info = DeviceInfo(
|
||||
|
@ -31,6 +31,7 @@ class DemoButton(ButtonEntity):
|
||||
"""Representation of a demo button entity."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
_attr_should_poll = False
|
||||
|
||||
def __init__(
|
||||
|
@ -92,6 +92,7 @@ class DemoClimate(ClimateEntity):
|
||||
"""Representation of a demo climate device."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
_attr_should_poll = False
|
||||
_attr_translation_key = "ubercool"
|
||||
|
||||
|
@ -58,6 +58,7 @@ class DemoCover(CoverEntity):
|
||||
"""Representation of a demo cover."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
_attr_should_poll = False
|
||||
|
||||
def __init__(
|
||||
|
@ -35,6 +35,7 @@ class DemoDate(DateEntity):
|
||||
"""Representation of a Demo date entity."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
_attr_should_poll = False
|
||||
|
||||
def __init__(
|
||||
|
@ -35,6 +35,7 @@ class DemoDateTime(DateTimeEntity):
|
||||
"""Representation of a Demo date/time entity."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
_attr_should_poll = False
|
||||
|
||||
def __init__(
|
||||
|
@ -96,6 +96,7 @@ class DemoLight(LightEntity):
|
||||
"""Representation of a demo light."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
_attr_should_poll = False
|
||||
|
||||
def __init__(
|
||||
|
@ -79,6 +79,7 @@ class DemoNumber(NumberEntity):
|
||||
"""Representation of a demo Number entity."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
_attr_should_poll = False
|
||||
|
||||
def __init__(
|
||||
|
@ -38,6 +38,7 @@ class DemoSelect(SelectEntity):
|
||||
"""Representation of a demo select entity."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
_attr_should_poll = False
|
||||
|
||||
def __init__(
|
||||
|
@ -142,6 +142,7 @@ class DemoSensor(SensorEntity):
|
||||
"""Representation of a Demo sensor."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
_attr_should_poll = False
|
||||
|
||||
def __init__(
|
||||
|
@ -37,6 +37,7 @@ class DemoSwitch(SwitchEntity):
|
||||
"""Representation of a demo switch."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
_attr_should_poll = False
|
||||
|
||||
def __init__(
|
||||
|
@ -54,6 +54,7 @@ class DemoText(TextEntity):
|
||||
"""Representation of a demo text entity."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
_attr_should_poll = False
|
||||
|
||||
def __init__(
|
||||
@ -69,7 +70,6 @@ class DemoText(TextEntity):
|
||||
) -> None:
|
||||
"""Initialize the Demo text entity."""
|
||||
self._attr_unique_id = unique_id
|
||||
self._attr_name = None
|
||||
self._attr_native_value = native_value
|
||||
self._attr_icon = icon
|
||||
self._attr_mode = mode
|
||||
|
@ -25,6 +25,7 @@ class DemoTime(TimeEntity):
|
||||
"""Representation of a Demo time entity."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
_attr_should_poll = False
|
||||
|
||||
def __init__(
|
||||
|
@ -88,6 +88,7 @@ class DemoUpdate(UpdateEntity):
|
||||
"""Representation of a demo update entity."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
_attr_should_poll = False
|
||||
|
||||
def __init__(
|
||||
|
Loading…
x
Reference in New Issue
Block a user