Last active
February 27, 2026 15:54
-
-
Save alexsotoaguilera/462e40dcbc40a0fa0dd460755ef3defa to your computer and use it in GitHub Desktop.
Home Assistant Blueprint: Alternative Plant problem notification
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
| blueprint: | |
| name: Alternative Plant problem notification | |
| description: | | |
| For each configured plant, checks its status and notifies if there are any problems. | |
| This blueprint works in conjunction with "Alternative plants component for Home Assistant". | |
| * https://github.com/Olen/homeassistant-plant | |
| domain: automation | |
| author: Alex Soto Aguilera | |
| source_url: https://github.com/alexsotoaguilera/homeassistant/tree/main/blueprints/automation/alexsotoaguilera/alternative-plant-problem-notification.yaml | |
| homeassistant: | |
| min_version: 2022.4.0 | |
| input: | |
| notification_time: | |
| name: Time to check all plant sensors | |
| description: The verification of the plant sensors takes place within the configured time. | |
| default: "10:00:00" | |
| selector: | |
| time: {} | |
| exclude: | |
| name: Excluded plants | |
| description: Plants to exclude from report. | |
| default: | |
| entity_id: [] | |
| selector: | |
| target: | |
| entity: | |
| - device_class: | |
| - plant | |
| devices_to_notify: | |
| name: Devices to notify | |
| description: Device needs to run the official Home Assistant app to receive notifications. | |
| default: [] | |
| selector: | |
| device: | |
| filter: | |
| - integration: mobile_app | |
| multiple: true | |
| variables: | |
| exclude_plant_entities: !input exclude | |
| notify_plant_entities: | | |
| {% set plant_entities = states.plant | map(attribute='entity_id') | select('is_state', 'problem') | list %} | |
| {% set data = namespace(notify_entities=[]) %} | |
| {% for plant_entity in plant_entities %} | |
| {% if plant_entity not in exclude_plant_entities %} | |
| {% set data.notify_entities = data.notify_entities + [plant_entity] %} | |
| {% endif %} | |
| {% endfor %} | |
| {{ data.notify_entities }} | |
| trigger: | |
| - platform: time | |
| at: !input "notification_time" | |
| action: | |
| - repeat: | |
| for_each: !input "devices_to_notify" | |
| sequence: | |
| - variables: | |
| device_to_notify: "{{ repeat.item }}" | |
| - repeat: | |
| for_each: "{{ notify_plant_entities }}" | |
| sequence: | |
| - service: "notify.mobile_app_{{ device_attr(device_to_notify, 'name') | slugify }}" | |
| data: | |
| title: "Plant WARNING: {{ state_attr(repeat.item, 'friendly_name') }}." | |
| message: | | |
| {% set plant_sensors = device_entities(device_id(repeat.item)) | select('is_state_attr', 'state_class', 'measurement') | list -%} | |
| {% for sensor in plant_sensors -%} | |
| {% if not is_state(sensor, 'unknown') -%} | |
| - {{ state_attr(sensor, 'device_class') }} {{ states(sensor) }}{{ state_attr(sensor, 'unit_of_measurement') }} | |
| {% endif -%} | |
| {% endfor -%} | |
| mode: single |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment