I’m working on a simple add-on in Python and I would like to print errors and warnings to the add-on log that is visible from the HA web interface. I would like them to be color-coded and timestamped.
From a Bash script (with the included bashio) this is easy:
bashio::log.error "This is an error!"
bashio::log.notice "Just a notice"
But I can’t figure out how to do this from my Python application. I could just print()
stuff and while that appears in the log in the web interface it’s not color-coded or timestamped. Does any have some insight in how to do this?