Skip to content

Commit

Permalink
adding sensor for DB file size
Browse files Browse the repository at this point in the history
  • Loading branch information
dmatik committed Feb 15, 2024
1 parent a111c98 commit 5f0960f
Showing 1 changed file with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,17 @@ sensor:
# #
############################################################################

- platform: template
sensors:
db_size_calculated:
friendly_name: "DB Size Calculated"
icon_template: mdi:database
unit_of_measurement: MB
value_template: >-
{% set size = states("sensor.events_size")|float
+ states("sensor.state_attributes_size")|float
+ states("sensor.states_size")|float
+ states("sensor.statistics_short_term_size")|float
+ states("sensor.statistics_size")|float
%}
{{ size }}
# - platform: template
# sensors:
# db_size_calculated:
# friendly_name: "DB Size Calculated"
# icon_template: mdi:database
# unit_of_measurement: MB
# value_template: >-
# {% set size = states("sensor.events_size")|float
# + states("sensor.state_attributes_size")|float
# + states("sensor.states_size")|float
# + states("sensor.statistics_short_term_size")|float
# + states("sensor.statistics_size")|float
# %}
# {{ size }}

0 comments on commit 5f0960f

Please sign in to comment.