Re-add state_class total to sensor (#55103)

* Re-add state_class total to sensor

* Make energy cost sensor enforce state_class total_increasing

* Bump deprecation of last_reset for state_class measurement

* Correct rebase mistakes
This commit is contained in:
Erik Montnemery 2021-09-06 18:28:58 +02:00 committed by GitHub
parent 2634949999
commit b99a22cd4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 101 additions and 10 deletions

View file

@ -45,10 +45,11 @@ async def test_deprecated_last_reset(hass, caplog, enable_custom_integrations):
assert (
"Entity sensor.test (<class 'custom_components.test.sensor.MockSensor'>) "
"with state_class measurement has set last_reset. Setting last_reset is "
"deprecated and will be unsupported from Home Assistant Core 2021.11. Please "
"update your configuration if state_class is manually configured, otherwise "
"report it to the custom component author."
"with state_class measurement has set last_reset. Setting last_reset for "
"entities with state_class other than 'total' is deprecated and will be "
"removed from Home Assistant Core 2021.11. Please update your configuration if "
"state_class is manually configured, otherwise report it to the custom "
"component author."
) in caplog.text