With the latest software version you can see on your website https://analytics.home-assistant.io/#installations the number of active installations.
Is it possible to have a sensor that reports the number of active installations?
Can’t you just scape the page?
You can do that, but when the page changes…
Or there must be some kind of API available.
A build-in sensor would be the most easy solution.
I think this should work:
rest:
- resource: https://analytics.home-assistant.io/data.json
scan_interval: 3600
sensor:
- name: "Global HASS statistics"
json_attributes_path: "$[?(@.last_updated)]"
value_template: "OK"
json_attributes:
- "active_installations"
HASS currently gives me an error with any use of REST, it seems there is a bug in that integration. Even this json test example doesn’t work for me. If you have time to test, please try these and share your feedback
Ok thanks, got it working:
Added this to format it the number. Use icon mdi:HomeAssistant (it seems you cannot put this in the template)
sensor:
- platform: template
sensors:
active_ha_installations:
friendly_name: Number of active HA installations
# format as 20,070
value_template: "{{'{0:,.0f}'.format(state_attr('sensor.global_hass_statistics','active_installations'))}}"
1 Like