Hello everyone,
I needed to enter digital data into a form, and from this form write this data to a file. According to the documentation, I found that this is possible and wrote a small automation:
alias: "H1 - test_test_test"
trigger:
- platform: state
entity_id: input_number.test_1
- platform: state
entity_id: input_number.test_2
- platform: state
entity_id: input_number.test_3
condition: []
action:
- service: shell_command.append_utility_reading
mode: single
I sketched a simple card on the dashboard:
type: entities
entities:
- entity: input_number.test_1
name: Test 1
- entity: input_number.test_2
name: Test 2
- entity: input_number.test_3
name: Test 3
title: N Test test tesT
in the configuration file for shell_command, I added:
there are no errors in the system, and no data is written to the file… If I’m doing something wrong, help me find a solution so that the data is written to a file.
In one of the options it was exactly like that , I tried to create and place a file in other directories. Through the ssh terminal, I changed the chmod on the file and on the directory. Realizing that I was walking in circles and there was no result, I wrote here.
I started my search for a solution with this integration, but either I didn’t figure it out, or it didn’t fit my needs… If you can provide any example related to a dashboard card and recording information from it into a file using the integration you specified, I would appreciate it.
The notification option of the integration basically does what you are trying to do with your shell command, the frontend input is something separate…
Using the same Input Number helpers you already have, once you set up the integration, the automation would be something like:
Though, a better option might be to use a Script that you fire manually instead of an Automation that fires for each input entity. You would add the script entity to your card so you can easily run it after you update the last value. That would keep your file from being 2/3 useless data.
Regarding the “dashboard card” aspect… If you aren’t happy with the layout/input functionality of the Entities card, you might want to take a look at the Custom Text Input Row.