Dmitriy Chekaykin
Published © GPL3+

Pet Bowl Monitor

Know when your pets bowl was refilled by housmates, without messaging anyone.

BeginnerFull instructions provided4 hours1,640
Pet Bowl Monitor

Things used in this project

Hardware components

Xiaomi door/window sensor
×1
Xiaomi Gateway
×1
Pet bowl with a stand
×1
Small neodymium magnet
×1
Insulation tape
Optional
×1
Double-sided adhesive tape
Optional
×1

Software apps and online services

Home Assistant
Home Assistant

Story

Read more

Schematics

Placment of the sensor

Code

Automation

YAML
Put it in the automations.yaml
 - id: '1313088393460'
     alias: '[CAT] Bowl placed'
     trigger:
     - entity_id: binary_sensor.cat_bowl_sensor
       platform: state
       to: 'off'
     condition: []
     action:
     - data:
         entity_id: input_boolean.cat_is_fed
       service: input_boolean.turn_on
   - id: '1474575821859'
     alias: '[CAT] Reset'
     trigger:
     - entity_id: input_boolean.cat_is_fed
       platform: state
       to: 'on'
       for:
         hours: 10
     condition: []
     action:
     - data:
         entity_id: input_boolean.cat_is_fed
       service: input_boolean.turn_off

Input Boolean

YAML
Put it in configuration.yaml
input_boolean:
  cat_is_fed:
    initial: off

Binary Sensor

YAML
Put it in configuration.yaml
binary_sensor:
  cat_is_fed:
    friendly_name: "Cat is fed"
    value_template: "{{ states.input_boolean.cat_is_fed.state == 'on' }}"

Lovelace

YAML
Put it in ui-lovelace.yaml
  - type: picture-entity
    entity: binary_sensor.cat_is_fed
    name: Cat is fed
    state_image:
      "on": /local/cat.png
      "off": /local/cat_triggered.png

Credits

Dmitriy Chekaykin
1 project • 0 followers

Comments