Home-AssistantConfig/config/packages/logger.yaml

45 lines
1.2 KiB
YAML
Executable File

#-------------------------------------------
# Realtime Debugging Related Packages
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
#-------------------------------------------
input_select:
log_level:
name: Log Level
options:
- critical
- fatal
- error
- warning
- warn
- info
- debug
- notset
initial: warn
icon: mdi:bug
###################################
## Dynamically set the log levels without having to restart HASS or edit configuration.yaml
#- Thanks @VDRainer
###################################
automation:
- alias: Log Level
id: 8196e9d4-5174-492e-8523-6ef70ccbd8dd
trigger:
platform: state
entity_id:
- input_select.log_level
# - input_select.log_component
action:
- service: logger.set_level
data:
homeassistant.components: "{{ states.input_select.log_level.state }}"
- service: script.tweet_engine_image
data:
tweet: "My logging level has just been set to {{ states.input_select.log_level.state }}"
image: >-
{{ [
"/config/www/custom_ui/floorplan/images/branding/keyboard.png"
] | random }}