Skip to content

Feature/Schedule-Card-Support - #225

Merged
jjjonesjr33 merged 2 commits into
jjjonesjr33:devfrom
C4-Dimitri:Feature/Schedule-Card-Support
Apr 29, 2026
Merged

Feature/Schedule-Card-Support#225
jjjonesjr33 merged 2 commits into
jjjonesjr33:devfrom
C4-Dimitri:Feature/Schedule-Card-Support

Conversation

@C4-Dimitri

@C4-Dimitri C4-Dimitri commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

Proposed change:

Adds full Petlibro support to @cristianchelu, Dispenser Schedule Card pull request his side here.

minimum required config for the card is:

type: custom:dispenser-schedule-card
device:
  type: petlibro
  device_id: 3eec2118e5895c302f33ba8d0e14a80a

device_id, being your specific dry food feeder's device ID, easiest way to get this on PC is just navigating to your device, and looking at your URL:
image
But i also recommend at least adding the secondary unit of measurement:

type: custom:dispenser-schedule-card
device:
  type: petlibro
  device_id: 3eec2118e5895c302f33ba8d0e14a80a
alternate_unit:
  unit_of_measurement:
    one: g
    other: g
  conversion_factor: 10

Full view of schedule for today.
image
Toggle whole schedule on/off - this is also customizable in the card itself to instead only interact with Today's Schedule.
image
can be accomplished by adding the switch config to the cards yaml:

type: custom:dispenser-schedule-card
device:
  type: petlibro
  device_id: 3eec2118e5895c302f33ba8d0e14a80a
  switch:
    state_entity: binary_sensor.jet_s_feeder_today_s_feeding_schedule
    off_button: button.jet_s_feeder_disable_all_plans_today
    on_button: button.jet_s_feeder_enable_all_plans_today

in which case turning it off, only skips all of the feeds for today (except any that have already occured):
image

Supports skipping, disabling, deleting, editing individiual entries:
image
editing:
image
supports adding feeds to the schedule (max feeding schedule entries is 10, this is Petlibro's side):
image
image

Quite a bit of refactoring was necessary to accomplish smooth working with this card. but it was definitely worth it.
some breaking changes:
Today's Feeding Schedule Binary Sensor attributes, no longer contains ANY of the feeding schedule info. the Feeding Schedule Binary Sensor Attributes instead contain all of this, and whether an event is for today is instead handled by a today flag in the event itself. the layout of the entire atttribute section is also quite different.

Example attribute output:
attributes:
  feed_conv_factor: 1
  schedule:
    - id: 3907147
      label: New1st
      time: "06:00"
      amount_cups: 0.083
      amount_oz: 0.35
      amount_g: 10
      amount_ml: 20
      amount_raw: 1
      enabled: true
      recurring: true
      repeat_days:
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
      sound: false
      today: true
      state: dispensed
    - id: 3907149
      label: New2nd
      time: "14:00"
      amount_cups: 0.083
      amount_oz: 0.35
      amount_g: 10
      amount_ml: 20
      amount_raw: 1
      enabled: true
      recurring: true
      repeat_days:
        - 7
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
      sound: false
      today: true
      state: dispensed
    - id: 5030885
      label: Backup
      time: "22:30"
      amount_cups: 0.083
      amount_oz: 0.35
      amount_g: 10
      amount_ml: 20
      amount_raw: 1
      enabled: true
      recurring: true
      repeat_days:
        - 5
        - 1
        - 6
        - 7
        - 4
        - 2
        - 3
      sound: false
      today: true
      state: skipped
    - id: 5048224
      label: Test
      time: "23:59"
      amount_cups: 0.083
      amount_oz: 0.35
      amount_g: 10
      amount_ml: 20
      amount_raw: 1
      enabled: false
      recurring: false
      repeat_days: []
      sound: false
      today: false
      state: pending

for users who used to use the lovely markdown card created by @yuejon, here, and want to keep using it, i have recreated this with the new format here (it also now supports displaying a disabled feed):
image

type: markdown
title: Jet's Feeding Schedule
content: >-
  <table width=100% border=0> <tr> <td align=center><b>Meal</b></td><td
  align=center><b>Time</b></td><td align=center><b>Amount</b></td><td
  align=center><b>Recurring</b></td><td align=center><b>Status</b></td></tr> {%
  set schedule = state_attr('binary_sensor.jet_s_feeder_feeding_schedule',
  'schedule') or [] %} {% for plan in schedule %} {% if plan.today == true %} {%
  if plan.enabled == false %} <tr><td align=center><font color=#808080>{{
  plan.label }}</font></td> <td align=center><font color=#808080>{{ plan.time
  }}</font></td> <td align=center><font color=#808080>{{ plan.amount_g
  }}g</font></td> <td align=center><font color=#808080><ha-icon
  icon=mdi:repeat-off></ha-icon></font></td> <td align=center><font
  color=#808080><ha-icon icon=mdi:cancel></ha-icon></font></td></tr> {% else %}
  <tr><td align=center>{{ plan.label }}</td> <td align=center>{{ plan.time
  }}</td> <td align=center>{{ plan.amount_g }}g</td> <td align=center> {% if
  plan.recurring == true %}<font color=#4caf50><ha-icon
  icon=mdi:repeat></ha-icon></font> {% else %}<font color=#fdd835><ha-icon
  icon=mdi:repeat-once></ha-icon></font> {% endif %}</td> <td align=center> {%
  if plan.state == 'dispensed' %}<font color=#4caf50><ha-icon
  icon=mdi:check-circle-outline></ha-icon></font> {% elif plan.state ==
  'to_be_skipped' %}<font color=#f37300><ha-icon
  icon=mdi:debug-step-over></ha-icon></font> {% elif plan.state == 'skipped'
  %}<font color=#f32d00><ha-icon icon=mdi:close-circle-outline></ha-icon></font>
  {% elif plan.state == 'pending' %}<font color=#fdd835><ha-icon
  icon=mdi:dots-horizontal-circle-outline></ha-icon></font> {% elif plan.state
  == 'unknown' %}<font color=#808080><ha-icon
  icon=mdi:help-circle-outline></ha-icon></font> {% else %}<font
  color=#f44336><ha-icon icon=mdi:alert-circle-outline></ha-icon></font> {%
  endif %}</td></tr> {% endif %} {% endif %} {% endfor %} </table>

replace the binary_sensor.jet_s_feeder_feeding_schedule with your own feeders binary_sensor.

Also a small fix to the Today's Schedule Binary Sensor, it now actually turns on / off correctly based on whether the today's schedule is on or off, it apparently was not working at all before, and was just perpetually on.

Also fixed the naming of all of our translation files to conform to HA's standards, so translations will actually happen now.

Type of change:

  • New device.
  • Bug fix (non-breaking change which fixes an issue).
  • New feature or enhancement (non-breaking change which adds functionality).
  • Documentation only.
  • Other (please explain).

Checklist:

  • If applicable, I have added corresponding documentation changes.
  • If applicable, I have reviewed the feature / enhancement guidlines before submitting my request.
  • If applicable, I have tested my code for new features & regressions on the latest version of Home Assistant.

Additional notes:

@cristianchelu

Copy link
Copy Markdown

For anyone who wants to preview the card as it interacts with these changes, inside HACS/dispenser-schedule-card you can download the v0.7-0petlibro.X pre-releases (latest currently .12)

I will delay merging & making a v0.8.0 release with petlibro support until this PR gets merged.

image

@jjjonesjr33 jjjonesjr33 self-assigned this Apr 29, 2026
@jjjonesjr33 jjjonesjr33 added the Enhancement New feature or request label Apr 29, 2026
@github-project-automation github-project-automation Bot moved this to To triage in Petlibro Apr 29, 2026
@jjjonesjr33 jjjonesjr33 added this to the Other milestone Apr 29, 2026

@jjjonesjr33 jjjonesjr33 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's give this a try in the latest pre-release.

@github-project-automation github-project-automation Bot moved this from To triage to In review in Petlibro Apr 29, 2026
@jjjonesjr33
jjjonesjr33 merged commit 30fbdaa into jjjonesjr33:dev Apr 29, 2026
2 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in Petlibro Apr 29, 2026
@cristianchelu

Copy link
Copy Markdown

v0.8.0 of card released with support for changes in this PR.

@jjjonesjr33 jjjonesjr33 added the Completed Completed tasks label Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Completed Completed tasks Enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants