From 358a58b03ae504408ce68504a503162a6cebc5c4 Mon Sep 17 00:00:00 2001 From: G Johansson Date: Wed, 11 Dec 2024 09:05:00 +0100 Subject: [PATCH] Add note on use of json_attribute in command_line (#36282) --- source/_integrations/command_line.markdown | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/_integrations/command_line.markdown b/source/_integrations/command_line.markdown index 4cf3c88f466..ab738b8f315 100644 --- a/source/_integrations/command_line.markdown +++ b/source/_integrations/command_line.markdown @@ -290,6 +290,10 @@ command_line: default: 30 {% endconfiguration %} +{% note %} +For sensors, while `value_template` is optional, if you set `json_attributes` because the output is a JSON, it is suggested to provide a template in the `value_template` field to provide a state to the sensor or the state will always be `unknown`. See [example](#usage-of-json-attributes-in-command-output) below. +{% endnote %} + ## Troubleshooting As **Command line** {% term integration %} is a yaml only integration, turning on extended logging needs to be done by setting the logging information in your {% term "`configuration.yaml`" %} file.