Show partial log in home assistant

hi,
i’m using occusim to have a light turn on at a random time and i would like to see what time that is within home assistant.

i dis some googling with my limited knowledge of python and put this together

from datetime import date
today = date.today()
# YYYY-mm-dd
d1 = today.strftime("%Y-%m-%d")
print(d1)
with open('//hassio/config/appdaemon/appdaemon.log', 'r') as searchfile:
    for line in searchfile:
        if 'INFO outside light Alert_on_0: @ '+d1 in line:
            print(line.split('Trigger:')[1])

how do i get this into HA, i’ve tried outputting to a file and using file sensor , but it doesn’t pick up the date and time.

could some please help

A bit late to the party but this is how I solved that:

- alias: 'Occusim: Notify on'
  trigger:
  - entity_id: script.which_is_triggered_by_occusim
    platform: state
    to: 'on'
  condition:
  - condition: state
    entity_id: input_boolean.occupancy_simulation
    state: 'on'
  action:
  - data:
      message: 'Occusim: lights on'
    service: notify.telegram

It looks for the entity that is to be turned on by Occusim, under the condition of the occupancy_simulation boolean.

I also wanted to have some easy to check access to log, to be able to verify how the automations I created works. So I created my own one.
I created 20 input_text entries and simple script that rotates their content by one and fills the first one with required message. E.g. when I want to log something I call the script with appropriate message. Script shifts second to last Input_text value to the last one, second, second to last to second to last one and so on until it reaches the first variable that is shifter to second one. Then received message is written to the first log entry.
To display log I use entities card with 20 ordered input_text entities.
To us it effectively I added call to script in every automation I want to trackor debug.