mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Add icon translations to Dexcom (#111368)
This commit is contained in:
parent
67165349c5
commit
4982e792f3
@ -3,7 +3,6 @@ from homeassistant.const import Platform
|
|||||||
|
|
||||||
DOMAIN = "dexcom"
|
DOMAIN = "dexcom"
|
||||||
PLATFORMS = [Platform.SENSOR]
|
PLATFORMS = [Platform.SENSOR]
|
||||||
GLUCOSE_VALUE_ICON = "mdi:diabetes"
|
|
||||||
|
|
||||||
GLUCOSE_TREND_ICON = [
|
GLUCOSE_TREND_ICON = [
|
||||||
"mdi:help",
|
"mdi:help",
|
||||||
|
9
homeassistant/components/dexcom/icons.json
Normal file
9
homeassistant/components/dexcom/icons.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"entity": {
|
||||||
|
"sensor": {
|
||||||
|
"glucose_value": {
|
||||||
|
"default": "mdi:diabetes"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -12,7 +12,7 @@ from homeassistant.helpers.update_coordinator import (
|
|||||||
DataUpdateCoordinator,
|
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(
|
async def async_setup_entry(
|
||||||
@ -55,7 +55,6 @@ class DexcomSensorEntity(CoordinatorEntity, SensorEntity):
|
|||||||
class DexcomGlucoseValueSensor(DexcomSensorEntity):
|
class DexcomGlucoseValueSensor(DexcomSensorEntity):
|
||||||
"""Representation of a Dexcom glucose value sensor."""
|
"""Representation of a Dexcom glucose value sensor."""
|
||||||
|
|
||||||
_attr_icon = GLUCOSE_VALUE_ICON
|
|
||||||
_attr_translation_key = "glucose_value"
|
_attr_translation_key = "glucose_value"
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user