Change Coinbase account state class to total (#59404)

pull/59416/head
Tom Brien 2021-11-09 12:00:12 +00:00 committed by GitHub
parent 62e7b0b887
commit fc58df6df9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -1,7 +1,11 @@
"""Support for Coinbase sensors."""
import logging
from homeassistant.components.sensor import STATE_CLASS_MEASUREMENT, SensorEntity
from homeassistant.components.sensor import (
STATE_CLASS_MEASUREMENT,
STATE_CLASS_TOTAL,
SensorEntity,
)
from homeassistant.const import ATTR_ATTRIBUTION
from homeassistant.helpers.entity import DeviceInfo
@ -105,7 +109,7 @@ class AccountSensor(SensorEntity):
API_ACCOUNT_CURRENCY
]
break
self._attr_state_class = STATE_CLASS_MEASUREMENT
self._attr_state_class = STATE_CLASS_TOTAL
self._attr_device_info = DeviceInfo(
configuration_url="https://www.coinbase.com/settings/api",
entry_type="service",