From 69243634ce8f6efc64c110ef110e4675d74043d2 Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Mon, 13 Mar 2023 18:24:53 -0400 Subject: [PATCH] Add default log level switching --- packages/sysmon.yaml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/packages/sysmon.yaml b/packages/sysmon.yaml index 21f149b..1d8d27c 100644 --- a/packages/sysmon.yaml +++ b/packages/sysmon.yaml @@ -12,6 +12,19 @@ input_select: - notset initial: error icon: mdi:bug + default_log_level: + name: Default Log Level + options: + - critical + - fatal + - error + - warning + - warn + - info + - debug + - notset + initial: error + icon: mdi:bug sensor: - platform: command_line @@ -128,4 +141,14 @@ automation: action: - service: logger.set_level data: - homeassistant.components: "{{ states('input_select.log_level') }}" \ No newline at end of file + homeassistant.components: "{{ states('input_select.log_level') }}" + + - id: e901db33-a6ab-4ee4-b13a-7b37991e0d85 + alias: Default Log Level + trigger: + - platform: state + entity_id: input_select.default_log_level + action: + - service: logger.set_default_level + data: + level: "{{ states('input_select.default_log_level') }}" \ No newline at end of file