mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 11:56:25 +01:00
This reverts commit 36c2e770bf
.
Addresses esphome/issues#4193.
This commit is contained in:
parent
b00e20c29f
commit
a44e38300b
@ -3,6 +3,7 @@ import esphome.config_validation as cv
|
|||||||
from esphome.components import sensor
|
from esphome.components import sensor
|
||||||
from esphome.const import (
|
from esphome.const import (
|
||||||
ENTITY_CATEGORY_DIAGNOSTIC,
|
ENTITY_CATEGORY_DIAGNOSTIC,
|
||||||
|
STATE_CLASS_TOTAL_INCREASING,
|
||||||
UNIT_SECOND,
|
UNIT_SECOND,
|
||||||
ICON_TIMER,
|
ICON_TIMER,
|
||||||
DEVICE_CLASS_DURATION,
|
DEVICE_CLASS_DURATION,
|
||||||
@ -16,6 +17,7 @@ CONFIG_SCHEMA = sensor.sensor_schema(
|
|||||||
unit_of_measurement=UNIT_SECOND,
|
unit_of_measurement=UNIT_SECOND,
|
||||||
icon=ICON_TIMER,
|
icon=ICON_TIMER,
|
||||||
accuracy_decimals=0,
|
accuracy_decimals=0,
|
||||||
|
state_class=STATE_CLASS_TOTAL_INCREASING,
|
||||||
device_class=DEVICE_CLASS_DURATION,
|
device_class=DEVICE_CLASS_DURATION,
|
||||||
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
|
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
|
||||||
).extend(cv.polling_component_schema("60s"))
|
).extend(cv.polling_component_schema("60s"))
|
||||||
|
Loading…
Reference in New Issue
Block a user