mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Migrate SQL to new entity naming style (#75203)
This commit is contained in:
parent
9a4a7e2f4d
commit
09f37fc522
@ -145,6 +145,7 @@ class SQLSensor(SensorEntity):
|
|||||||
"""Representation of an SQL sensor."""
|
"""Representation of an SQL sensor."""
|
||||||
|
|
||||||
_attr_icon = "mdi:database-search"
|
_attr_icon = "mdi:database-search"
|
||||||
|
_attr_has_entity_name = True
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -157,7 +158,6 @@ class SQLSensor(SensorEntity):
|
|||||||
entry_id: str,
|
entry_id: str,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Initialize the SQL sensor."""
|
"""Initialize the SQL sensor."""
|
||||||
self._attr_name = name
|
|
||||||
self._query = query
|
self._query = query
|
||||||
self._attr_native_unit_of_measurement = unit
|
self._attr_native_unit_of_measurement = unit
|
||||||
self._template = value_template
|
self._template = value_template
|
||||||
|
Loading…
x
Reference in New Issue
Block a user