HA Inventory/stock list

Hi All
I have a small cigars humidor cave at home and so far I’ve integrated some temperature and humidity monitoring on it. Is helping me to track that they are stored in proper conditions.
Now I was looking to track the quantity and different types of cigars i have stored, looking at shooping list integration but it is really basic not allowing you to track quantities, brands, types, strength flavours etc.
Do you have any suggestion what can I use to integrate my stock management in HA?
Thanks in advance

Hi facuzestoa,
I found if you run this search in your search engine, there are several results.

site:home-assistant.io cigar

Thanks SG, I already take a look and found some reference to people using Grocy, so I´M testing a demo now And think i will include HA addon.
Keep posted here of future results

Finally i put in place cigar inventory using Grocy and prepared a Lovelace page to present some information of the quantities and types in my humidor.
Ím interacting with Grocy with “ Shopping List with Grocy Integration” from HACS and using BrowserMod to pop up some extra details.


1 Like

Any chance you can write up how you configured grocy / ha at a high level? I am trying to do something similar and would appreciate some pointers. What did you use use in grocy to capture cigars? How did you display them on HA after configuring the integration?

Hi @squ sure here below some details:

Grocy configuration
On “Manage Master Data” menu:
a. On “Locations” I’ve created my two humidors where I put cigars. A small cedar wood box and a 35 liters electric humidor I bought in Amazon
b. On “Stores” I’ve created place where I’m usually buying
c. In “Product Groups” created a group called “Cigars”
d. I’ve created some userfield to register some specific details of cigars


e. Then you need to start creating each product, one per cigar type you have. I take the time to find one picture of each one from manufacturer or reseller sites, and also add some wording detailing flavour, pairing etc (on “Description” field.


f. Then from “Purchase” menu you can start adding your stock, for each cigar product created you can register how many you have, the price you bought it, which humidor is stored and where you bought it.
g. With this you get your full stock in Grocy. That is indeed a very good tool to do all the job.

Integration with HomeAssistant.
I’ve created a lovelace page that present you overall status of electric humidor content. (The picture in previous posts)

Note that some custom HACS components are required
Shopping List with Grocy Integration
bootstrap-grid-card
apexcharts-card
auto-entities
layout-card
mod-card
button-card

The code below create a grid with a small card for each product created in Grocy, include “Product Name”, “Picture” and “Stock”.
When you double click on any card a browser mode pop-up give few more details on the cigar selected.

title: TEST GROCY
path: test-grocy
visible:
  - user: xxxxxxxxxxxxxxxxxxxxxxx
type: custom:bootstrap-grid-card
cards:
  - type: horizontal-stack
    title: Cava Humidor de Habanos
    cards:
      - type: custom:apexcharts-card
        header:
          show: true
          title: Humedad
        series:
          - entity: sensor.humidor_inferior_humidity_corrected
          - entity: sensor.humidor_medio_humidity_corrected
          - entity: sensor.humidor_superior_humidity_corrected
        graph_span: 7d
        span:
          end: day
        apex_config:
          chart:
            height: 290px
      - type: custom:apexcharts-card
        header:
          show: true
          title: Temperatura
        series:
          - entity: sensor.humidor_inferior_temperature
          - entity: sensor.humidor_medio_temperature
          - entity: sensor.humidor_superior_temperature
        graph_span: 7d
        span:
          end: day
        apex_config:
          chart:
            height: 290px
  - type: custom:auto-entities
    class: col-12 col-lg-12 p-0
    card:
      type: custom:layout-card
      layout_type: grid
      layout_options:
        grid-template-columns: 20% 20% 20% 20% 20%
        mediaquery:
          "(max-width: 600px)":
            grid-template-columns: 50% 50%
          "(max-width: 900px)":
            grid-template-columns: 25% 25% 25% 25%
    filter:
      include:
        - entity_id: sensor.shopping_list_with_grocy_.*
          sort:
            method: friendly_name
          options:
            type: custom:button-card
            entity: this.entity_id
            aspect_ratio: 9/6
            show_icon: false
            show_label: true
            show_state: false
            label: |
              [[[
                return `Cantidad: ${entity.attributes.qty_in_stock}`
              ]]]
            tap_action:
              action: none
            double_tap_action:
              action: fire-dom-event
              browser_mod:
                service: browser_mod.popup
                data:
                  title: Detalles de Habano
                  content:
                    type: custom:mod-card
                    style: |
                      ha-card {
                        border-radius: 15px;
                        background-color: white;
                        box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
                        padding: 16px;
                      }
                    card:
                      type: vertical-stack
                      cards:
                        - type: markdown
                          content: |
                            [[[
                              return `${entity.attributes.friendly_name}`
                            ]]]
                        - type: picture
                          image: |
                            [[[
                               return 'data:image/jpg;base64,' + 
                               `${entity.attributes.product_image}`;
                            ]]]
                        - type: markdown
                          content: |
                            [[[
                              return `Intensidad: ${entity.attributes.userfields.hstrenght}`
                            ]]]
                        - type: markdown
                          content: |
                            [[[
                              return `Formato: ${entity.attributes.userfields.hformat}`
                            ]]]
                        - type: markdown
                          content: |
                            [[[
                              return `Vitola: ${entity.attributes.userfields.hringgauge}`
                            ]]]
                        - type: markdown
                          content: |
                            [[[
                              return `Largo: ${entity.attributes.userfields.hlenght}`
                            ]]]
                        - type: markdown
                          content: |
                            [[[
                              return `Disfrute: ${entity.attributes.userfields.henjoymenttime}`
                            ]]]
                        - type: markdown
                          content: |
                            [[[
                              return `Stock: ${entity.attributes.qty_in_stock}`
                            ]]]
                  large: false
                  timeout: 15000
                  browser_id:
                    - xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                  right_button: SI
                  left_button: "NO"
            hold_action:
              action: none
            styles:
              label:
                - z-index: 1
                - font-size: small
                - font-color: black
                - font-weight: bold
                - margin-top: 20%
              name:
                - z-index: 1
                - font-size: large
                - font-color: black
                - font-weight: bold
                - margin-bottom: 15%
              card:
                - background-image: |
                    [[[
                       return 'url("data:image/jpg;base64,' + 
                       `${entity.attributes.product_image}` + '")';
                    ]]]
                - background-repeat: no-repeat
                - background-position: center
                - background-color: white
                - background-size: 70%
                - border-width: |
                    [[[
                      if (entity.attributes.product_image)
                       return "0";
                      else
                       return "var(--ha-card-border-width, 1px)";
                    ]]]
              custom_fields:
                gradient:
                  - display: |
                      [[[
                        if (entity.attributes.product_image)
                         return "block";
                        else
                         return "none";
                      ]]]
                  - height: |
                      [[[
                        if (entity.attributes.product_image)
                         return "100%";
                        else
                         return "0px";
                      ]]]
                  - width: |
                      [[[
                        if (entity.attributes.product_image)
                         return "100%";
                        else
                         return "0px";
                      ]]]
                  - font-size: |
                      [[[
                        if (entity.attributes.product_image)
                         return "auto";
                        else
                         return "0px";
                      ]]]
                  - line-height: |
                      [[[
                        if (entity.attributes.product_image)
                         return "auto";
                        else
                         return "0px";
                      ]]]
            card_mod:
              style: |
                ha-card {
                  height: 100%;
                  height: -moz-available;          /* WebKit-based browsers will ignore this. */
                  height: -webkit-fill-available;  /* Mozilla-based browsers will ignore this. */
                  height: fill-available;
                }
                ha-card #gradient {
                  position: absolute !important;
                  top: 0%;
                  left: 0;
                  z-index: 0;
                  background-image: linear-gradient(
                    0deg,
                    hsla(0, 0%, 0%, 0.8) 0%,
                    hsla(0, 0%, 0%, 0.79) 8.3%,
                    hsla(0, 0%, 0%, 0.761) 16.3%,
                    hsla(0, 0%, 0%, 0.717) 24.1%,
                    hsla(0, 0%, 0%, 0.66) 31.7%,
                    hsla(0, 0%, 0%, 0.593) 39%,
                    hsla(0, 0%, 0%, 0.518) 46.1%,
                    hsla(0, 0%, 0%, 0.44) 53%,
                    hsla(0, 0%, 0%, 0.36) 59.7%,
                    hsla(0, 0%, 0%, 0.282) 66.1%,
                    hsla(0, 0%, 0%, 0.207) 72.3%,
                    hsla(0, 0%, 0%, 0.14) 78.3%,
                    hsla(0, 0%, 0%, 0.083) 84%,
                    hsla(0, 0%, 0%, 0.039) 89.6%,
                    hsla(0, 0%, 0%, 0.01) 94.9%,
                    hsla(0, 0%, 0%, 0) 100%
                  );
                }
                ha-card .ellipsis {
                  white-space: normal
                }
      exclude: []
    sort:
      method: attribute
      attribute: location
theme: Caule Light Purple
background: black
icon: mdi:cigar

Hope this helps to give you some ideas, keep me updated on any improvement.