mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 10:17:09 +00:00
Fix Rituals Perfume Genie sensors icons (#53517)
This commit is contained in:
parent
31079a05b3
commit
b26e65d7e5
@ -51,9 +51,12 @@ class DiffuserPerfumeSensor(DiffuserEntity):
|
|||||||
"""Initialize the perfume sensor."""
|
"""Initialize the perfume sensor."""
|
||||||
super().__init__(diffuser, coordinator, PERFUME_SUFFIX)
|
super().__init__(diffuser, coordinator, PERFUME_SUFFIX)
|
||||||
|
|
||||||
self._attr_icon = "mdi:tag-remove"
|
@property
|
||||||
if diffuser.has_cartridge:
|
def icon(self) -> str:
|
||||||
self._attr_icon = "mdi:tag-text"
|
"""Return the perfume sensor icon."""
|
||||||
|
if self._diffuser.has_cartridge:
|
||||||
|
return "mdi:tag-text"
|
||||||
|
return "mdi:tag-remove"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def state(self) -> str:
|
def state(self) -> str:
|
||||||
@ -70,9 +73,12 @@ class DiffuserFillSensor(DiffuserEntity):
|
|||||||
"""Initialize the fill sensor."""
|
"""Initialize the fill sensor."""
|
||||||
super().__init__(diffuser, coordinator, FILL_SUFFIX)
|
super().__init__(diffuser, coordinator, FILL_SUFFIX)
|
||||||
|
|
||||||
self._attr_icon = "mdi:beaker-question"
|
@property
|
||||||
if diffuser.has_cartridge:
|
def icon(self) -> str:
|
||||||
self.attr_icon = "mdi:beaker"
|
"""Return the fill sensor icon."""
|
||||||
|
if self._diffuser.has_cartridge:
|
||||||
|
return "mdi:beaker"
|
||||||
|
return "mdi:beaker-question"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def state(self) -> str:
|
def state(self) -> str:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user