dawidchyrzynski / arduino-home-assistant

ArduinoHA allows to integrate an Arduino/ESP based device with Home Assistant using MQTT.
https://dawidchyrzynski.github.io/arduino-home-assistant/
GNU Affero General Public License v3.0
463 stars 112 forks source link

How to not log messages in logbook of home assistant #210

Closed peno64 closed 7 months ago

peno64 commented 7 months ago

Via HASensor I send the time of my arduino device to home assistant. This every second. This is logged in the logbook. Is there a possibility not to have the log for it?

peno64 commented 7 months ago

Found the solution myself:

.setUnitOfMeasurement("")

As is written here: https://www.home-assistant.io/integrations/logbook/#exclude

"Sensor entities that have been assigned units (i.e., have a unit_of_measurement attribute) are assumed to change frequently and those sensors are automatically excluded from the logbook."

Fortunately this also works for an empty unit.