tom_l
September 22, 2024, 12:04am
1
Input text helpers are difficult to edit when there is a lot of text. The entities card only shows it as one line.
Is there an “input text box” type card anyone knows of?
So instead of:
Something like this: https://github.com/faeibson/lovelace-multiline-text-input-card
Though unfortunately that card has not been supported for 4 years and it maxes out at 100 characters even though the entity can support 255.
Mikefila
(Mike Fila)
September 22, 2024, 12:28am
2
Return it’s state in a markdown card
tom_l
September 22, 2024, 12:29am
3
Sorry If I wasn’t clear, I need to be able to edit it from the card.
Mikefila
(Mike Fila)
September 22, 2024, 1:06am
4
I knew I was missing something. They added a feature for scripts that when opened you get a multi line input box . I can’t find where it’s documented though or if it can be populated with an entity state. It definitely expands and allows multi line input.
tom_l
September 22, 2024, 1:18am
5
That’s an excellent idea. Thanks.
They are script “fields”. See https://www.home-assistant.io/integrations/script/#fields
Mikefila
(Mike Fila)
September 22, 2024, 1:44am
6
I see, what I overlooked was the selectors link. That shows all the options for the input section.
https://www.home-assistant.io/docs/blueprint/selectors/#text-selector
tom_l
September 22, 2024, 1:45am
7
Hmm. I don’t seem to be able to get it to work correctly. Tried with and without the default template:
# scripts.yaml
update_ignore_list:
alias: Update Ignore List
fields:
ignore_list:
name: Ignore List
description: "Sensors to ignore"
example: "sensor.one,sensor.two"
default: "{{ states('input_text.ignore_list')}}"
required: true
sequence:
- service: input_text.set_value
target:
entity_id: input_text.ignore_list
data:
value: "{{ ignore_list}}"
All I get is an “action data” input, no named field, no default:
tom_l
September 22, 2024, 1:53am
9
Damn. It does not support templates. Which makes it kind of useless:
update_ignore_list:
alias: Update Ignore List
fields:
ignore_list:
name: Ignore List
description: "Sensors to ignore"
example: "sensor.one,sensor.two"
default: "{{ states('input_text.ignore_list')}}"
required: true
selector:
text:
multiline: true
sequence:
- service: input_text.set_value
target:
entity_id: input_text.ignore_list
data:
value: "{{ ignore_list}}"
A possible (untested) solution - cardmodding input box: height, multiline
tom_l
September 22, 2024, 11:36pm
11
I just tried removing the default
option in the hope that the entity current value would populate. It did not.
Will take a look in 10 days.
1 Like
Coming back with negative results.
A brute way was not successful:
injected some changes by Code Inspector:
and got this:
But the state of the helper is not processed (i.e. changed text in not saved inside a “state”) - probably an “input” object is required.
Info here.
1 Like
tom_l
September 30, 2024, 10:44pm
14
No worries. Thanks for trying.
It could be a very useful control. Bad we do not have it supported in HA.