Custom Alert

Hello guys,
I need help with my own notification of dbm signals from SFPs in aggregators. We use huawei s5720 devices. I need to create a notification using a template where I receive notifications from SPF RX or TX Power. I can see the current values ​​of the (health) huawei device via the web What do I need?. Ports which are up, with their descriptions. At the end some value which cannot cross (etc. -25 dBm).

Here is my Alert with add ports to custom group

and teplate
{{ $alert->title }}
Device Name: {{ $alert->hostname }}
@if ($alert->state == 0) Time elapsed: {{ $alert->elapsed }} @endif
Rule: @if ($alert->name) {{ $alert->name }} @else {{ $alert->rule }} @endif
@foreach ($alert->faults as $key => $value)

Physical Interface: {{ $value[‘ifDescr’] }}
Interface Description: {{ $value[‘ifAlias’] }}
@endforeach

This is alert from mail:
ZX #ALERT (TEST)# got worse
Device Name: ******
Rule: ZX # ALERT (TEST)#
Physical Interface: GigabitEthernet0/0/11
Interface Description: no82-12

Physical Interface: GigabitEthernet0/0/12
Interface Description: no77-12

Physical Interface: GigabitEthernet0/0/15
Interface Description: gpon-topolianska

Physical Interface: GigabitEthernet0/0/16
Interface Description: gpon-hradok

atc…

what is good, but if i add to alert sensor.sensors_currnet with less or equal valuse, this is what i got

and template with added Actual value of signal’s: {{ number_format($value[‘sensor_current’]/1000*1000, 2) }} dBm

{{ $alert->title }}
Device Name: {{ $alert->hostname }}
@if ($alert->state == 0) Time elapsed: {{ $alert->elapsed }} @endif
Rule: @if ($alert->name) {{ $alert->name }} @else {{ $alert->rule }} @endif
@foreach ($alert->faults as $key => $value)

Physical Interface: {{ $value[‘ifDescr’] }}
Interface Description: {{ $value[‘ifAlias’] }}
Actual value of signal’s: {{ number_format($value[‘sensor_current’]/1000*1000, 2) }} dBm
@endforeach

This is alert from mail:

why i got multiple outputs ?
Thanks