Repository navigation
sensor uptime #703
|
Is it possible to add an uptime node sensor? |
Answered by
shwetankg07
Oct 1, 2026
Replies: 1 comment
|
It's already there, just not called "uptime". Nodes, VMs and containers each get a Last boot sensor ( If you want the uptime as a number (for graphs or automations), a template sensor on top of it works: template:
- sensor:
- name: "PVE uptime"
unit_of_measurement: "d"
state: >
{{ ((now() - as_datetime(states('sensor.YOUR_NODE_last_boot'))).total_seconds() / 86400) | round(1) }}Replace |
0 replies
Answer selected by
shurakenas
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's already there, just not called "uptime". Nodes, VMs and containers each get a Last boot sensor (
PROXMOX_SENSOR_UPTIMEinsensor.py, built from theuptimethe Proxmox API reports). It's a timestamp sensor (now - uptime), so Home Assistant shows it as "3 days ago", which is the uptime. It's enabled by default, so check the node's device page.If you want the uptime as a number (for graphs or automations), a template sensor on top of it works:
Replace
sensor.YOUR_NODE_last_boot…