swa72 / home-assistant

13 stars 1 forks source link

best practise logging #73

Closed swa72 closed 2 years ago

swa72 commented 2 years ago

to debug an automation or script add to lovelace

type: logbook
entities:
  - automation.fake_test_automation
hours_to_show: 12

In the automation use

  - service: logbook.log
    data:
      entity_id: automation.fake_test_automation
      message: some message
      name: automation.fake_test_automation

You could also run the trace function.