title: Stock path: stock icon: mdi:fridge-variant type: panel visible: - user: 24a4bd075e7f41a497dd0390a1dd4a9f - user: cad46dedf86f454ebbd7f697a58730f2 cards: - type: horizontal-stack cards: - type: vertical-stack cards: - type: horizontal-stack cards: # - type: custom:mushroom-title-card # title: "{{states('sensor.energy_tariff')}}" # subtitle: "{{states('sensor.energy_cost')}} $/kWh" - type: custom:mushroom-chips-card chips: - type: back - type: custom:mushroom-title-card title: Shopping - type: markdown content: |- {% if state_attr('binary_sensor.grocy_missing_products','count')|int(default=0) > 0 %} ## Missing ## |Name|Missing|Available| |:---|:---:|---:| {%- for i in range(0,(state_attr('binary_sensor.grocy_missing_products','count')|int(default=0) )) %} |{{ (state_attr("binary_sensor.grocy_missing_products", "missing_products")[i]).name }} | {{ (state_attr("binary_sensor.grocy_missing_products", "missing_products")[i]).amount_missing }} | {{ (state_attr("binary_sensor.grocy_missing_products", "missing_products")[i]).available_amount }} | {%- endfor %} {% endif %} {% if state_attr('binary_sensor.grocy_expiring_products','count')|int(default=0) > 0 %} *** ## Expiring ## {% for i in range(0,(state_attr('binary_sensor.grocy_expiring_products','count')|int(default=0) )) %} {{ (state_attr("binary_sensor.grocy_expiring_products", "expiring_products")[i]).name }} {%- endfor %} {% endif %} {% if state_attr('binary_sensor.grocy_expired_products','count')|int(default=0) > 0 %} *** ## Expired ## {% for i in range(0,(state_attr('binary_sensor.grocy_expired_products','count')|int(default=0) )) %} {{ (state_attr("binary_sensor.grocy_expired_products", "expired_products")[i]).name }} {%- endfor %} {% endif %} {% if state_attr('binary_sensor.grocy_overdue_products','count')|int(default=0) > 0 %} *** ## Overdue ## | Product | Best Before | |:---|---:| {%- for i in range(0,(state_attr('binary_sensor.grocy_overdue_products','count')|int(default=0) )) %} | {{ (state_attr("binary_sensor.grocy_overdue_products", "overdue_products")[i]).name }} | {{ (state_attr("binary_sensor.grocy_overdue_products", "overdue_products")[i]).best_before_date }} | {%- endfor %} {% endif %} {% if states('sensor.grocy_stock')|int(default=0) > 0 %} *** ## Stock ## |Product|Available| |:---|---:| {%- for i in range(0,(state_attr('sensor.grocy_stock','count')|int(default=0) )) %} |{{ (state_attr("sensor.grocy_stock", "products")[i]).name }} | {{ (state_attr("sensor.grocy_stock", "products")[i]).available_amount }} | {%- endfor %} {% else %}### No stock on hand ###{% endif %} - type: glance entities: - entity: input_button.grocy_purchase_am_meds name: AM Meds tap_action: action: toggle - entity: input_button.grocy_purchase_pm_meds name: PM Meds tap_action: action: toggle - entity: input_button.grocy_purchase_milk name: Milk tap_action: action: toggle - entity: input_button.grocy_purchase_diet_coke_12_pack name: Diet Coke (12) tap_action: action: toggle show_state: false columns: 4 title: Purchase - type: glance entities: - entity: input_button.grocy_consume_am_meds name: AM Meds - entity: input_button.grocy_consume_pm_meds name: PM Meds - entity: input_button.grocy_consume_milk name: Milk - entity: input_button.grocy_consume_diet_coke name: Diet Coke tap_action: action: call-service service: input_button.press show_state: false title: Consume columns: 4