ДЦ
Size: a a a
ДЦ
bС
AS
ДЦ
ДЦ
bС
ДЦ
O
ДЦ
O
ДЦ
- platform: command_line
name: config_line_count_sh
command: 'bash /config/line_count.sh'
scan_interval: 120
- platform: command_line
name: config_line_count_sh_code
command: 'bash /config/line_count_code.sh'
scan_interval: 120
- platform: template
sensors:
config_line_count_sh_ratio:
friendly_name: Config Line Count Usage
value_template: "{{ (states('sensor.config_line_count_sh_code')|int / states('sensor.config_line_count_sh')|int * 100) | round(0) }}"
unit_of_measurement: '%'
icon_template: mdi:brightness-percent
ДЦ
#!/bin/bash
find . -name '*.yaml' -type f -print0 | xargs -0 cat | wc -l
ДЦ
#!/bin/bash
find . -name '*.yaml' -type f -print0 | xargs -0 cat | sed '/^\s*#/d;/^\s*$/d' | wc -l
O
ДЦ
IB
ДЦ
O
ДЦ
/