Create an automation on certain error message in Host log

I have a serial device that seems to stop working after a while and I can see exactly when that happens because there is an error message in the HA OS Host log.
I want to create an HA Automation when that error message string appears in the Host log file. Is that possible?

1 Like

I am not after the HA Core logs.

I want to read and trigger an event based on the HA Host log.
I can see the log via Settings->System->Logs->Host

I don’t use HAOS so I can’t confirm if the system can access that log file or not. Assuming it can, you can just use the file integration to read the most recent line in the log. Then you can build an automation off the state of that sensor.

I have no idea how the HA UI is able to pull the Host log to display it when using HAOS.
But so far everything I have seen seems to suggest that only the HA core log is accessible.