Not sure if it is an issue or a weird situation.
Basically, I am adding a custom log to track some specific actions, mainly to easily analyze some automation executions.
I created a script to save this on the logs.
The problem is I am seeing duplicated entries on the log for a single execution:
automation yaml:
alias: SCHEDULE - Riego Rain Factor 11:55PM
description: ""
trigger:
- platform: time
at: "23:55:00"
condition: []
action:
- if:
- condition: numeric_state
entity_id: sensor.l0bit0netatmoext_rain_precipitation_today
above: 1
then:
- data: {}
target:
entity_id: input_boolean.riego_rain_factor
action: input_boolean.turn_on
- action: script.action_add_event_log
metadata: {}
data:
log_message: "ON"
log_tittle: RainFactor
else:
- metadata: {}
data: {}
target:
entity_id: input_boolean.riego_rain_factor
action: input_boolean.turn_off
- action: script.action_add_event_log
metadata: {}
data:
log_tittle: Rain Factor
log_message: "OFF"
mode: single
Script yaml
alias: ACTION - Add LogBook Log
sequence:
- action: logbook.log
metadata: {}
data:
name: "{{ log_tittle }}"
message: "{{ log_message }}"
entity_id: input_text.custom_log_l0bit0
description: ""
fields:
log_tittle:
selector:
text: null
name: Log_Tittle
log_message:
selector:
text: null
name: Log_Message
logbook entries:
I expected a single line on the logbook. I am missing anything?
Thanks