# Dito Ton exemple de notification
actions:
- action: notify.send_message # n'utilise pas ton module?
metadata: {}
data:
message: Alarme activer !
target:
entity_id:
- notify.maman # Il faudrait expliquer comment tu trouves notify.maman
# Si je prends un exemple d'automatisation, cela ne fonctionne pas. Déja il faut trouver la target notify
action: freesmsxa.send_sms
enabled: false
data:
target: notify.free_mobile_sms_5g_5g
message: 'UPS a changé d''état '
# et j'ai une jolie trace File "/config/custom_components/freesmsxa/__init__.py", line 29, in handle_send_sms
if target not in hass.services.services.get("notify", {}):
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2633, in services
return run_callback_threadsafe(self._hass.loop, self.async_services).result()
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 58, in run_callback_threadsafe
raise RuntimeError("Cannot be called from within the event loop")
RuntimeError: Cannot be called from within the event loop