#automation question if toogoodtoogo has stock and below price

1 messages · Page 1 of 1 (latest)

deft pendant
#

automation question if toogoodtoogo has stock and below price

#

i'm having a question my automation isn't working and i don't know why

#
alias: carrefourkopen
description: ""
triggers:
  - trigger: time_pattern
    seconds: "10"
conditions:
  - condition: numeric_state
    entity_id: >-
      sensor.too_good_to_go_toogoodtogo_carrefour_market_oostrozebeke_verrassingspakket
    above: 0
  - condition: numeric_state
    entity_id: sensor.toogoodtogo_carrefour_oostrozebeke_price
    below: 5
actions:
  - action: notify.telegram_alex
    metadata: {}
    data:
      message: >-
        Toogoodtogo Carrefour oostrozebeke is onder de 5€ en er is een pakketje
        vrij
mode: single
#

it should check every 10 sec if there is stock and the price of the package is below 5€ then it should telegram me

#

has stock

#

the price of that toogood to go shop has variable prices

#

it startes with 7,49€

#

tomorrow at noon its 4,99€

#

the idea is that it only telegrams me if the price is below 5€

#

maybe its because of home assistant arrounds 4,99 to 5€ ?

#

that its not below 5€ ?

#

or is my automation wrong

#

i will put 5,2€ below to try

earnest walrus
#

Polling every 10 sec isn't smart. And that's not what your trigger does this way 😄

To do it smart, simply trigger on:

  • the fact there becomes stock available
  • The price goes below 5

Keep the conditions

Thus:

alias: carrefourkopen
description: ""
triggers:
  - trigger: numeric_state
    entity_id:
      - sensor.too_good_to_go_toogoodtogo_carrefour_market_oostrozebeke_verrassingspakket
    above: 0
  - trigger: numeric_state
    entity_id:
      - sensor.toogoodtogo_carrefour_oostrozebeke_price
    below: 5
conditions:
  - condition: numeric_state
    entity_id: sensor.too_good_to_go_toogoodtogo_carrefour_market_oostrozebeke_verrassingspakket
    above: 0
  - condition: numeric_state
    entity_id: sensor.toogoodtogo_carrefour_oostrozebeke_price
    below: 5
actions:
  - action: notify.telegram_alex
    metadata: {}
    data:
      message: >-
        Toogoodtogo Carrefour oostrozebeke is onder de 5€ en er is een pakketje
        vrij
mode: single
deft pendant
#

hm ok thanks for the advice and the time

#

i used this now we will see thanks have a nice day