Automated reminder to feed my cat

I have a dumb cat feeder which has 5 bowls of food, one is always open to the cat. Every day at 5:15 AM the feeder rotates to the next bowl. I figured that a counter helper would be the best way to work this, I setup an automation which decrements a counter to indicate how many bowls of food are left, ie when counter = 4 the bowls are all full save for the current one and when counter=1 it will spin to an empty bowl tomorrow morning.

  • Automation decrements the counter by 1 every morning when the bowl feeder rotates (close enough anyway).
  • If the counter reaches 1 it sets a timer which is just an offset so I’m not getting the notification at 5:15 AM, when the timer goes off (12 hours and 45 minutes later so it should go off at 6PM)
  • the automation then sends me a notification as reminder to fill the feeder.
  • I also added a redundancy in that if the counter gets to 0 it will send me a notification right then and there (the cat gets really annoying at 5:15 AM if his food is MIA and it isn’t always clear why he’s being annoying, often he wont bother me but my wife who isn’t the one who feeds him).
  • The counter is reset via scanning an NFC tag.

My issue is that I’m getting a weird error message and I can’t seem to understand or relate to any of the google search results I get from it. “Message Malformed: must contain atleast one of below, above.”
See below for the yaml of my automation, its a lot of little things I wrote all into one automation as they are all doing the same task.

description: Maintains cat food counter helper, alerts me when I need to refill the feeder.
mode: single
trigger:
  - platform: time
    at: "05:15:00"
    id: Feeder_Decrement
  - platform: numeric_state
    entity_id: counter.cat_food
    value_template: "1"
    id: Food_1
  - platform: state
    entity_id:
      - timer.cat_food_notification_offset
    from: active
    to: idle
    id: Notify_1
  - platform: tag
    tag_id: 0f256ebe-435e-4616-9329-f030282f5838
    id: refill
  - platform: numeric_state
    entity_id: counter.cat_food
    value_template: "0"
    id: Food_0
condition: []
action:
  - if:
      - condition: trigger
        id: Feeder_Decrement
    then:
      - service: counter.decrement
        data: {}
        target:
          entity_id: counter.cat_food
  - if:
      - condition: trigger
        id: Food_1
    then:
      - service: timer.start
        data: {}
        target:
          entity_id: timer.cat_food_notification_offset
  - if:
      - condition: or
        conditions:
          - condition: trigger
            id: Notify_1
          - condition: trigger
            id: Food_0
    then:
      - service: notify.mobile_app_josh_phone
        data:
          message: Feed The Damn Cat
  - if:
      - condition: trigger
        id: refill
    then:
      - service: counter.reset
        data: {}
        target:
          entity_id: counter.cat_food
alias: Cat Feeder

Change this trigger:

  - platform: numeric_state
    entity_id: counter.cat_food
    value_template: "1"
    id: Food_1

To:

  - platform: state
    entity_id: counter.cat_food
    to: 1
    id: Food_1

Same for food_0

1 Like

That appears to have done the trick, first time working with counters. Being a number, I guess I jsut assumed I should use the numeric state