Files
esphome-configs/common/sensor/uptime.yaml
T
randy 3676c0bbcc
CI / YAML lint (push) Successful in 7s
CI / ESPHome config validation (push) Successful in 58s
mcu-its-g5: MQTT only, to the own broker with an EMQX bridge to OpenTrafficMap
HA can't reach the API on the car hotspot, so the device talks MQTT to the own
broker like the tracker; EMQX forwards its/<node_id>/# to cits1.opentrafficmap.org.
API and homeassistant time removed, the OTA key set directly.

MQTT discovery unique ids with the MAC (its-g5 and tracker): the default
ESP<type><object_id> made the common entities of both devices clash in HA.
Uptime in "d": HA MQTT discovery rejects "days" with device class duration.
2026-11-17 21:59:19 +01:00

10 lines
211 B
YAML

---
platform: uptime
name: Uptime
id: uptime_sensor
unit_of_measurement: d # HA unit for duration; MQTT discovery rejects "days"
accuracy_decimals: 2
update_interval: 60s
filters:
- lambda: return x / 86400;