Add icon translations to Dexcom (#111368)

This commit is contained in:
Joost Lekkerkerker 2024-02-25 14:17:08 +01:00 committed by GitHub
parent 67165349c5
commit 4982e792f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 3 deletions

View File

@ -3,7 +3,6 @@ from homeassistant.const import Platform
DOMAIN = "dexcom"
PLATFORMS = [Platform.SENSOR]
GLUCOSE_VALUE_ICON = "mdi:diabetes"
GLUCOSE_TREND_ICON = [
"mdi:help",

View File

@ -0,0 +1,9 @@
{
"entity": {
"sensor": {
"glucose_value": {
"default": "mdi:diabetes"
}
}
}
}

View File

@ -12,7 +12,7 @@ from homeassistant.helpers.update_coordinator import (
DataUpdateCoordinator,
)
from .const import COORDINATOR, DOMAIN, GLUCOSE_TREND_ICON, GLUCOSE_VALUE_ICON, MG_DL
from .const import COORDINATOR, DOMAIN, GLUCOSE_TREND_ICON, MG_DL
async def async_setup_entry(
@ -55,7 +55,6 @@ class DexcomSensorEntity(CoordinatorEntity, SensorEntity):
class DexcomGlucoseValueSensor(DexcomSensorEntity):
"""Representation of a Dexcom glucose value sensor."""
_attr_icon = GLUCOSE_VALUE_ICON
_attr_translation_key = "glucose_value"
def __init__(