Last active
August 10, 2025 20:31
-
-
Save saippuakauppias/58f56f35fc4a2eb938de787736c7415d to your computer and use it in GitHub Desktop.
[HA] Мониторинг напряжения - восстановление
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Для второго condition требуется интеграция: https://www.home-assistant.io/integrations/uptime/ | |
| # | |
| alias: Мониторинг напряжения - восстановление | |
| description: Отправляет уведомления при восстановлении напряжения выше 189В | |
| triggers: | |
| - entity_id: | |
| - sensor.datchik_napriazheniia_1_ext_voltage | |
| - sensor.datchik_napriazheniia_2_ext_voltage | |
| - sensor.datchik_napriazheniia_3_ext_voltage | |
| above: 189 | |
| trigger: numeric_state | |
| below: 234 | |
| for: | |
| hours: 0 | |
| minutes: 1 | |
| seconds: 0 | |
| conditions: | |
| - condition: and | |
| conditions: | |
| - condition: template | |
| value_template: | | |
| {{ trigger.from_state.state not in ['unavailable', 'unknown'] }} | |
| - condition: template | |
| value_template: > | |
| {{ (now() - states('sensor.uptime')|as_datetime).total_seconds() > 180 | |
| }} | |
| actions: | |
| - data: | |
| title: 🔌 Восстановление напряжения | |
| message: > | |
| Напряжение на фазах: | |
| {% if states('sensor.datchik_napriazheniia_1_ext_voltage')|float < 189 | |
| %}⤵️{% elif states('sensor.datchik_napriazheniia_1_ext_voltage')|float > | |
| 234 %}⤴️{% else %}✅{% endif %} Фаза 1: {{ | |
| states('sensor.datchik_napriazheniia_1_ext_voltage') }}В | |
| {% if states('sensor.datchik_napriazheniia_2_ext_voltage')|float < 189 | |
| %}⤵️{% elif states('sensor.datchik_napriazheniia_2_ext_voltage')|float > | |
| 234 %}⤴️{% else %}✅{% endif %} Фаза 2: {{ | |
| states('sensor.datchik_napriazheniia_2_ext_voltage') }}В | |
| {% if states('sensor.datchik_napriazheniia_3_ext_voltage')|float < 189 | |
| %}⤵️{% elif states('sensor.datchik_napriazheniia_3_ext_voltage')|float > | |
| 234 %}⤴️{% else %}✅{% endif %} Фаза 3: {{ | |
| states('sensor.datchik_napriazheniia_3_ext_voltage') }}В | |
| Отключение длилось: {{ relative_time(trigger.from_state.last_changed) }} | |
| action: notify.warning | |
| mode: single | |
| max_exceeded: silent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment