Closed LDprg closed 1 year ago
You can use the logger component as mentioned in documentation: https://hacs-pyscript.readthedocs.io/en/latest/reference.html?highlight=log#logging
Try to change the log level in your configuration.yaml:
logger:
logs:
custom_components.pyscript: info
Reload your home assistant configuration. After this you can add logs statement to your pyscripts:
log.info("my first log")
To log info directly into HA logbook use this service
logbook.log(name="Hello World", message="Hello from pyscript")
Oh, thx. Didn't know that I can achieve this with a service.
@LDprg could you please update or close the issue? Thank you
Sorry, I will now close.
As I am using pyscript without jupyternotebooks (I am using docker and those didn't worked), I want to get a simpler method for printing logs that direct into the HA ones. Is there a way to create Logbook entries?