Skip to content

Commit

Permalink
Fix: update issues (#17)
Browse files Browse the repository at this point in the history
* fix state/device class

* implement new await hass.config_entries.async_forward_entry_setups

* Update const.py
  • Loading branch information
yo-han authored Feb 6, 2023
1 parent 56117e5 commit 3fcf8af
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion custom_components/carelink/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
COORDINATOR: coordinator,
}

hass.config_entries.async_setup_platforms(entry, PLATFORMS)
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)

return True

Expand Down
20 changes: 10 additions & 10 deletions custom_components/carelink/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@
SensorEntityDescription(
key=SENSOR_KEY_LASTSG_TIMESTAMP,
name="Last sensor update",
native_unit_of_measurement=DATETIME,
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=None,
state_class=None,
device_class=SensorDeviceClass.TIMESTAMP,
icon="mdi:clock",
entity_category=None,
Expand All @@ -110,7 +110,7 @@
key=SENSOR_KEY_LASTSG_TREND,
name="Last glucose trend",
native_unit_of_measurement=None,
state_class=SensorStateClass.MEASUREMENT,
state_class=None,
device_class=None,
icon="mdi:chart-line",
entity_category=None,
Expand Down Expand Up @@ -200,7 +200,7 @@
key=SENSOR_KEY_LAST_ALARM,
name="Last alarm",
native_unit_of_measurement=None,
state_class=SensorStateClass.MEASUREMENT,
state_class=None,
device_class=SensorDeviceClass.TIMESTAMP,
icon="mdi:clock",
entity_category=None,
Expand All @@ -209,7 +209,7 @@
key=SENSOR_KEY_ACTIVE_BASAL_PATTERN,
name="Active basal pattern",
native_unit_of_measurement=None,
state_class=SensorStateClass.MEASUREMENT,
state_class=None,
device_class=None,
icon="mdi:chart-line",
entity_category=None,
Expand Down Expand Up @@ -281,7 +281,7 @@
key=SENSOR_KEY_LAST_MEAL_MARKER,
name="Last meal marker",
native_unit_of_measurement=None,
state_class=SensorStateClass.MEASUREMENT,
state_class=None,
device_class=SensorDeviceClass.TIMESTAMP,
icon="mdi:calendar-alert",
entity_category=None,
Expand All @@ -290,7 +290,7 @@
key=SENSOR_KEY_LAST_INSULIN_MARKER,
name="Last insulin marker",
native_unit_of_measurement=None,
state_class=SensorStateClass.MEASUREMENT,
state_class=None,
device_class=SensorDeviceClass.TIMESTAMP,
icon="mdi:calendar-alert",
entity_category=None,
Expand All @@ -299,7 +299,7 @@
key=SENSOR_KEY_LAST_AUTO_BASAL_DELIVERY_MARKER,
name="Last auto basal delivery marker",
native_unit_of_measurement=None,
state_class=SensorStateClass.MEASUREMENT,
state_class=None,
device_class=SensorDeviceClass.TIMESTAMP,
icon="mdi:calendar-alert",
entity_category=None,
Expand All @@ -308,7 +308,7 @@
key=SENSOR_KEY_LAST_AUTO_MODE_STATUS_MARKER,
name="Last auto mode status marker",
native_unit_of_measurement=None,
state_class=SensorStateClass.MEASUREMENT,
state_class=None,
device_class=SensorDeviceClass.TIMESTAMP,
icon="mdi:calendar-alert",
entity_category=None,
Expand All @@ -317,7 +317,7 @@
key=SENSOR_KEY_LAST_LOW_GLUCOSE_SUSPENDED_MARKER,
name="Last low glucose suspended marker",
native_unit_of_measurement=None,
state_class=SensorStateClass.MEASUREMENT,
state_class=None,
device_class=SensorDeviceClass.TIMESTAMP,
icon="mdi:calendar-alert",
entity_category=None,
Expand Down

0 comments on commit 3fcf8af

Please sign in to comment.