Boa noite camaradas
O meu deixou de funcionar … o que poderá ser? Fiz agora o teste e não recebo nada no telemovel.
automation:
- alias: "Tentativa de Ataque Home Assistant"
trigger:
- platform: state
entity_id: persistent_notification.httplogin
condition:
- condition: template
value_template: "{{ trigger.to_state.state != 'None' }}"
action:
- service: notify.telegram
data_template:
title: "Tentativa de Ataque Home Assistant"
message: "{{ states.persistent_notification.httplogin.attributes.message }}"
data:
url: https://whatismyipaddress.com/ip/{{ states.persistent_notification.httplogin.attributes.message.split("from ") [1]}}
Penso que issou mudou tenta assim altera para os teus dados:
alias: "homeassistant_attack_attempt"
initial_state: 'on'
hide_entity: false
trigger:
- platform: state
entity_id: persistent_notification.http_login
condition:
- condition: template
value_template: "{{ trigger.to_state.state != off }}"
# value_template: "{{ trigger.to_state.state != 'None' }}"
action:
- service: notify.myphone
data_template:
title: "Neautorizovaný pokus o login"
message: "{{ states.persistent_notification.http_login.attributes.message }}"
data:
url: https://whatismyipaddress.com/ip/{{ states.persistent_notification.http_login.attributes.message.split("from ") [1]}
Essa dá erro…
Após ajuste meti:
automation:
- alias: "Tentativa de Ataque Home Assistant"
initial_state: 'on'
hide_entity: false
trigger:
platform: state
entity_id: persistent_notification.http_login
condition:
condition: template
value_template: "{{ trigger.to_state.state != 'off' }}"
action:
service: notify.telegram
data_template:
title: "Tentativa de Ataque Home Assistant"
message: "{{ states.persistent_notification.http_login.attributes.message }}"
data:
url: https://whatismyipaddress.com/ip/{{ states.persistent_notification.http_login.attributes.message.split("from ") [1]}}
E não recebo nada na mesma