Uptime Sensor
The uptime sensor allows you to track the time the ESP has stayed up for in seconds.
Time rollovers are automatically handled.
# Example configuration entrysensor: - platform: uptime type: seconds name: Uptime SensorConfiguration variables
Section titled “Configuration variables”-
type (Optional): Either:
seconds(default): A simple counter.timestamp: presents the time ESPHome last booted up. Requires a Time.
-
update_interval (Optional, Time): The sensor reporting interval. Defaults to
60s. Valid only withtype: seconds.
# Working exampletime: - platform: homeassistant id: esptime
sensor: - platform: uptime name: "My Device Last Boot" type: timestamp time_id: esptime device_class: timestamp entity_category: diagnostic- All other options from Sensor.