Hello everyone. New to HA (well, been fiddling for a month). This is my first post here. I’m kind of stuck and hoping for some help. Here’s what I’m trying to do:
We have a stray cat. I want a display on the dashboard that shows, starting at 8 AM that the stray cat is out and about. I currently have DOODS AI watching our outdoor camera and checking for cats. As soon as it detects a cat, I want that display to change to “Cat is home; needs food.” At that point, one of us will feed the cat, and then manually press the display, which will change it to “Cat fed.” It should remain that way until 8 AM.
I’ve got most of this figured out. I created a sensor in my YAML for this purpose:
template:
- sensor:
- name: "Black Kitty"
state: away
I also created a Mushroom Template card that mostly works:
- type: custom:mushroom-template-card
primary: |-
{% if is_state('sensor.black_kitty', 'away') %}
Adventuring
{% elif is_state('sensor.black_kitty', 'hungry') %}
Awaiting noms...
{% else %}
Home and fed!
{% endif %}
picture: >-
https://i.pinimg.com/originals/da/45/59/da45599388682ff2b2365ba23c126a44.jpg
badge_icon: |-
{% if is_state('sensor.black_kitty', 'away') %}
mdi:paw
{% elif is_state('sensor.black_kitty', 'hungry') %}
mdi:food
{% else %}
mdi:home
{% endif %}
badge_color: |-
{% if is_state('sensor.black_kitty', 'away') %}
grey
{% elif is_state('sensor.black_kitty', 'hungry') %}
red
{% else %}
green
{% endif %}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
icon: ''
secondary: last-changed
entity: sensor.black_kitty
multiline_secondary: false
What I don’t know how to do is configure the tap_action event to change the sensor from “hungry” to “fed”. In my Googling I’m starting to thing doing this with a “sensor” is not the right way to do it. Is there a better way of accomplishing what I’m trying to do here? I haven’t gotten to the other two automations (one triggered at 8 AM, and one triggered by the AI) which will also need to change the state of the sensor, but I assume this is all possible - but maybe not in the manner in which I’m trying to accomplish it?
Many thanks in advance!