I have been given this amazing script by @le_top which iterates through your ZHA devices using ZHA Toolkit, but on each iteration it writes a line out to the log as the action, this is the relevant section:-
- repeat:
for_each: "{{ wait.trigger.event.data.devices }}"
sequence:
- service: system_log.write
data:
logger: zha_devices
level: error
message: >-
{{ "Name: %s, (%s) Power: %s dBm, Available: %s" % (
repeat.item.user_given_name, repeat.item.name,
repeat.item.rssi, repeat.item.available ) }}
Instead, I’d like to be able to concatenate the output into a single string that I can email.
Any assistance on how I might go about that would be gratefully received.