Skip to content

Commit

Permalink
Revert using has_entity_name in ESPHome when friendly_name is not s…
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Jul 30, 2023
1 parent 5e3bcc1 commit afdbbef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion homeassistant/components/esphome/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ class EsphomeEntity(Entity, Generic[_InfoT, _StateT]):
"""Define a base esphome entity."""

_attr_should_poll = False
_attr_has_entity_name = True
_static_info: _InfoT
_state: _StateT
_has_state: bool
Expand Down Expand Up @@ -169,6 +168,7 @@ def __init__(
connections={(dr.CONNECTION_NETWORK_MAC, device_info.mac_address)}
)
self._entry_id = entry_data.entry_id
self._attr_has_entity_name = bool(device_info.friendly_name)

async def async_added_to_hass(self) -> None:
"""Register callbacks."""
Expand Down

0 comments on commit afdbbef

Please sign in to comment.