Save ESPHOME log into homeassistant

It is possible to save the log of an esphome device into homeassistant?

to debug in the future or in case of problems?

1 Like

homesssistant is not a storage device. You can save the log to a file I suppose.

Did you ever found out how to view the log ? Is the only way to watch it from the addon itself?

no you can use the command line.

How do you mean?

esphome switch1.yaml logs

Sorry to bring this topic up, but, is there a way to store all ESPHome logs?
I want to detect if my device has errors, if it restarts from time to time, etc.

Thanks!

ESPHome is able to send log entries to MQTT:

mosquitto_sub -v -t "topic/name" > mylog.txt

More info can be found in the manpage.

1 Like

or use the syslog component:

1 Like