im trying to create my own logbook that only deals with entities, but I want to put them into human readable form.
Currently Im doing this triggered by an automation:
- service: logbook.log
data:
message: >-
my custom string with {{ sensor.custom_template_string }}
name: "The watcha ma call it"
entity_id: sensor.custom_logbook
What is reported in the UI logbook card has all the other stuff that I dont want like “triggered by logbook automation” etc etc.
So in an effort to remove that part from the string, I tried the custom:logbook-card
which is pretty good BUT it only logs states - not entries made by logbook.log
Unfortunately, logbook.log does not log the string into the sensor as a state and seems to log directly into the logbook database (which is fair enough). If you go into dev tools and look at the states after the log operation has been made the sensor state is always blank.
So in an effort to achieve this I want to update a sensor state (with a string through an automation using a BUTTON as a trigger (stateless, so if/elif in a template sensors is out)
So how do I update a sensor with a state “manually” these days???
Is @petros suggestion still best practise these days? https://community.home-assistant.io/t/how-to-manually-set-state-value-of-sensor/43975/115?