Misc
Templates Used
person.USER is edited under 'Settings > Users'
sersor.steps_USER is edited under 'Settings > Devices > Helpers'
phone.USER is edited in the 'configuration.yaml'
Disk Free: {{ states('sensor.paarthurnax_disk_free') }} GB
Disk Free: {{ ((states('sensor.paarthurnax_disk_free')|float)/1000)|round(3) }} TB
Disk Used: {{ ((states('sensor.paarthurnax_disk_used')|float)/1000)|round(3) }} TB
Disk Total: {{ ((states('sensor.paarthurnax_disk_total')|float)/1000)|round(3) }} TB
Disk Used %: {{ ((states('sensor.paarthurnax_disk_used')|float)/1000)|round(3) / ((states('sensor.paarthurnax_disk_total')|float)/1000)|round(3) * 100 }}
Disk Used: {{( ((states('sensor.paarthurnax_disk_used') | float)/1000) | round(3) / ((states('sensor.paarthurnax_disk_total') | float)/1000) | round(3) * 100) | round(2) }}%
"{{ is_state('person.jazz', 'home') or is_state('person.chris', 'home') }}"
{{ states('sensor.steps_USER2') }}
{{ states('sensor.steps_USER1') }}
{{ '{:,.0f}'.format(states('sensor.steps_USER1') | float(0)) }}
{{ '{:,.0f}'.format(states('sensor.steps_USER2') | float(0)) }}
{{ '{:,.0f}'.format(states('sensor.USER1_galaxy_watch4_daily_steps') | float(0)) }}
{{ '{:,.0f}'.format(states('sensor.USER2_galaxy_watch4_daily_steps') | float(0)) }}
{{ states('sensor.steps_USER1')|int(0) }}
{{ states('sensor.steps_USER2')|int(0) }}
Congratulations USER1! You have won the step challenge today.
Sorry USER1, you did not win the step challenge today.
Score: You: {{ '{:,.0f}'.format(states('sensor.steps_USER1') | float(0)) }} | USER2: {{ '{:,.0f}'.format(states('sensor.steps_USER2') | float(0)) }}
Congratulations USER2! You have won the step challenge today.
Sorry USER2, you did not win the step challenge today.
Score: You: {{ '{:,.0f}'.format(states('sensor.steps_USER2') | float(0)) }} | USER1: {{ '{:,.0f}'.format(states('sensor.steps_USER1') | float(0)) }}
{{not is_state('device_tracker.USER1_s22_ultra', 'home') and not is_state('device_tracker.USER2_s22_ultra', 'home') }}
{{not is_state('person.USER1', 'home') and not is_state('person.USER2', 'home') }}Sensors.yml
#Time / Date
- platform: time_date
display_options:
- "time"
- "date"
- "date_time"
- "time_date"
- "beat"
# Weather Icon
- platform: template
sensors:
weather_just_icon:
friendly_name: "mdi Real Weather Icon"
unique_id: "100001"
icon_template: >-
{% set weather_icon = states('weather.styla_manor_ha') %}
{% if weather_icon == 'partlycloudy' %}
mdi:weather-partly-cloudy
{% elif weather_icon == 'thunderstorm' %}
mdi:weather-lightning
{% elif weather_icon == weather_icon%}
mdi:weather-{{weather_icon}}
{% else %}
mdi:weather-cloudy-alert
{% endif %}
value_template: >-
{% set weather_icon = states('weather.styla_manor_ha') %}
{% if weather_icon == 'partlycloudy' %}
mdi:weather-partly-cloudy
{% elif weather_icon == 'thunderstorm' %}
mdi:weather-lightning
{% elif weather_icon == weather_icon%}
mdi:weather-{{weather_icon}}
{% else %}
mdi:weather-cloudy-alert
{% endif %}
# Lights
- platform: template
sensors:
lights_on_count:
friendly_name: "How many lights are on"
unique_id: "1001"
value_template: >-
{{ expand(state_attr('light.all', 'entity_id') )
| selectattr('state', 'eq', 'on')
| list
| count
}}
#PAARTHURNAX
- platform: template
sensors:
paarthurnax_disk_used_percent:
friendly_name: "PARTHURNAX Array Used %"
entity_id: sensor.paarthurnax_disk_used_percent
unit_of_measurement: '%'
value_template: "{{( ((states('sensor.paarthurnax_disk_used') | float)/1000) | round(3) / ((states('sensor.paarthurnax_disk_total') | float)/1000) | round(3) * 100) | round(2) }}"
- platform: template
sensors:
paarthurnax_disk_free_tb:
friendly_name: "PAARTHURNAX Array Free TB"
entity_id: sensor.paarthurnax_disk_free_tb
unit_of_measurement: 'TB'
value_template: "{{ ((states('sensor.paarthurnax_disk_free')|float)/1000)|round(3) }}"
- platform: template
sensors:
paarthurnax_disk_used_tb:
friendly_name: "PAARTHURNAX Array Used TB"
entity_id: sensor.paarthurnax_disk_usedtb
unit_of_measurement: 'TB'
value_template: " {{ ((states('sensor.paarthurnax_disk_used')|float)/1000)|round(3) }}"
- platform: template