-
Notifications
You must be signed in to change notification settings - Fork 58
-
I am just getting started with pyscript. I have it running, but logging doesn't seem to work.
in my configuration.yaml
I have
logger: default: info logs: custom_components.pyscript: debug
My script file is this
@service def hello(name: str = "world"): log.debug(f"[HELLO] entered hello(name={name!r})") light.toggle(entity_id="light.shelly_dimmer_master_sitting_room") msg = f"Hello, {name}!" log.info(f"[HELLO] {msg}") task.sleep(0.1) # example of yielding; keeps HA responsive log.debug("[HELLO] leaving hello()")
I can run the script, and it toggles the light. This tells me the script can run and it works.
However, Going to Settings -> System -> Logs and looking at the Home Assistant Core
log, I don't see any of my log messages. Logs from other things in my system are there, but nothing from my hello.py script.
Any help would be appreciated.
P.S. I've restarted HASS a few times, so that's not the problem.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
Answered in your issue #745 (comment)
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment