mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-22 00:36:49 +00:00
Add default value for active installations (#18666)
This commit is contained in:
parent
4d3d8ba472
commit
0f03e6e96c
@ -1,4 +1,5 @@
|
||||
{% assign percentage = 100.0 | times: site.data.analytics_data.integrations[page.ha_domain] | divided_by: site.data.analytics_data.reports_integrations | round: 1 %}
|
||||
{% assign active_installations = site.data.analytics_data.integrations[page.ha_domain] | default: 0 %}
|
||||
{% assign percentage = 100.0 | times: active_installations | divided_by: site.data.analytics_data.reports_integrations | round: 1 %}
|
||||
<section class="aside-module grid__item one-whole lap-one-half">
|
||||
<div class='brand-logo-container section'>
|
||||
{%- if page.logo -%}
|
||||
@ -17,7 +18,7 @@
|
||||
and it's used by <a title="Open analytics.home-assistant.io" href="https://analytics.home-assistant.io/#integrations" target="_blank" rel="noopener">
|
||||
|
||||
{% if percentage < 1 %}
|
||||
{{ site.data.analytics_data.integrations[page.ha_domain] }}</a> active installations.
|
||||
{{ active_installations }}</a> active installations.
|
||||
{% else %}
|
||||
{{ percentage | remove: ".0" }}%</a> of the active installations.
|
||||
{% endif %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user