Add selectors to Logger, System Log & Logbook service definitions (#46740)

This commit is contained in:
Franck Nijhof 2021-02-18 16:33:29 +01:00 committed by GitHub
parent 62e0949ea9
commit 3f96ebeae5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 67 additions and 13 deletions

View File

@ -1,15 +1,29 @@
log:
description: Create a custom entry in your logbook.
description: Create a custom entry in your logbook
fields:
name:
name: Name
description: Custom name for an entity, can be referenced with entity_id
required: true
example: "Kitchen"
selector:
text:
message:
name: Message
description: Message of the custom logbook entry
required: true
example: "is being used"
selector:
text:
entity_id:
name: Entity ID
description: Entity to reference in custom logbook entry [Optional]
example: "light.kitchen"
selector:
entity:
domain:
name: Domain
description: Icon of domain to display in custom logbook entry [Optional]
example: "light"
selector:
text:

View File

@ -1,22 +1,43 @@
set_default_level:
description: Set the default log level for components.
description: Set the default log level for components
fields:
level:
description: "Default severity level. Possible values are debug, info, warn, warning, error, fatal, critical"
name: Level
description:
"Default severity level. Possible values are debug, info, warn, warning,
error, fatal, critical"
example: debug
selector:
select:
options:
- debug
- info
- warning
- error
- fatal
- critical
set_level:
description: Set log level for components.
description: Set log level for components
fields:
homeassistant.core:
description: "Example on how to change the logging level for a Home Assistant core components. Possible values are debug, info, warn, warning, error, fatal, critical"
description:
"Example on how to change the logging level for a Home Assistant core
components. Possible values are debug, info, warn, warning, error,
fatal, critical"
example: debug
homeassistant.components.mqtt:
description: "Example on how to change the logging level for an Integration. Possible values are debug, info, warn, warning, error, fatal, critical"
description:
"Example on how to change the logging level for an Integration. Possible
values are debug, info, warn, warning, error, fatal, critical"
example: warning
custom_components.my_integration:
description: "Example on how to change the logging level for a Custom Integration. Possible values are debug, info, warn, warning, error, fatal, critical"
description:
"Example on how to change the logging level for a Custom Integration.
Possible values are debug, info, warn, warning, error, fatal, critical"
example: debug
aiohttp:
description: "Example on how to change the logging level for a Python module. Possible values are debug, info, warn, warning, error, fatal, critical"
description:
"Example on how to change the logging level for a Python module.
Possible values are debug, info, warn, warning, error, fatal, critical"
example: error

View File

@ -1,15 +1,34 @@
clear:
description: Clear all log entries.
description: Clear all log entries
write:
description: Write log entry.
description: Write log entry
fields:
message:
description: Message to log. [Required]
name: Message
description: Message to log.
required: true
example: Something went wrong
selector:
text:
level:
description: "Log level: debug, info, warning, error, critical. Defaults to 'error'."
name: Level
description: "Log level: debug, info, warning, error, critical."
default: error
example: debug
selector:
select:
options:
- "debug"
- "info"
- "warning"
- "error"
- "critical"
logger:
description: Logger name under which to log the message. Defaults to 'system_log.external'.
name: Logger
description:
Logger name under which to log the message. Defaults to
'system_log.external'.
example: mycomponent.myplatform
selector:
text: