Skip to content

v1.2.0 — expired_list and low_stock_list sensor attributes

Choose a tag to compare

@dadaloop82 dadaloop82 released this 29 May 06:07

What's new in v1.2.0

Added

  • expired_list attributesensor.evershelf_expired_items now exposes a full list of expired products with all details (name, quantity, unit, location, brand, category, days_remaining, opened_at, vacuum_sealed). Previously only the count was available.
  • low_stock_list attributesensor.evershelf_low_stock_items now exposes a full list of low-stock products (quantity ≤ 1) with all details.

Requirements

  • EverShelf ≥ v1.7.27 (new expired_list / low_stock_list sensor attributes were added in that release)

Example — Telegram alert with expired product details

automation:
  - alias: "Notify expired products"
    trigger:
      - platform: state
        entity_id: sensor.evershelf_expired_items
    condition:
      - condition: template
        value_template: "{{ trigger.to_state.state | int > 0 }}"
    action:
      - service: notify.telegram
        data:
          message: >
            Expired products:
            {% for item in state_attr('sensor.evershelf_expired_items', 'expired_list') %}
            - {{ item.name }} ({{ item.quantity }} {{ item.unit }}) — {{ item.location }}
            {% endfor %}