From fba4ea3baae313c4b327ce9313c25551536a4338 Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Thu, 9 Mar 2023 13:45:49 -0500 Subject: [PATCH] Add changeable logging settings --- packages/sysmon.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/packages/sysmon.yaml b/packages/sysmon.yaml index bc2610e..915a96f 100644 --- a/packages/sysmon.yaml +++ b/packages/sysmon.yaml @@ -1,3 +1,18 @@ +input_select: + log_level: + name: Log Level + options: + - critical + - fatal + - error + - warning + - warn + - info + - debug + - notset + initial: error + icon: mdi:bug + sensor: - platform: command_line name: Lines of Code @@ -94,3 +109,14 @@ binary_sensor: name: Internet host: 8.8.8.8 scan_interval: 5 + +automation: + - id: 22b034d3-a7c2-4499-9db5-6e36dd1c8be4 + alias: Log Level + trigger: + - platform: state + entity_id: input_select.log_level + action: + - service: logger.set_level + data: + homeassistant.components: "{{ states('input_select.log_level') }}" \ No newline at end of file