mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Fix SQL sensor name (#134414)
This commit is contained in:
parent
dc5bfba902
commit
877d16273b
@ -331,9 +331,16 @@ class SQLSensor(ManualTriggerSensorEntity):
|
|||||||
entry_type=DeviceEntryType.SERVICE,
|
entry_type=DeviceEntryType.SERVICE,
|
||||||
identifiers={(DOMAIN, unique_id)},
|
identifiers={(DOMAIN, unique_id)},
|
||||||
manufacturer="SQL",
|
manufacturer="SQL",
|
||||||
name=self.name,
|
name=self._rendered.get(CONF_NAME),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str | None:
|
||||||
|
"""Name of the entity."""
|
||||||
|
if self.has_entity_name:
|
||||||
|
return self._attr_name
|
||||||
|
return self._rendered.get(CONF_NAME)
|
||||||
|
|
||||||
async def async_added_to_hass(self) -> None:
|
async def async_added_to_hass(self) -> None:
|
||||||
"""Call when entity about to be added to hass."""
|
"""Call when entity about to be added to hass."""
|
||||||
await super().async_added_to_hass()
|
await super().async_added_to_hass()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user