Pull Request: Enhanced Schedule Viewing and Calendar Card Documentation#19
Pull Request: Enhanced Schedule Viewing and Calendar Card Documentation#19nowjon wants to merge 5 commits into
Conversation
…ling - Enable schedule entities by default (changed disabled: True to False) - Fix critical bug: change .items() to direct iteration on coordinator.data - Add validation helper function for schedule entries - Add schedule export to file functionality with automatic cleanup (keeps 5 most recent) - Add filtering for disabled schedule entries - Add comprehensive logging throughout schedule operations - Add error handling for individual schedule fetches and sync operations - Improve data processing with validation and error recovery
- Add human-readable schedule attributes (schedule_entries, schedule_count) - Add powerpetdoor.update_schedule service for programmatic schedule updates - Enhance extra_state_attributes with formatted schedule information - Add comprehensive documentation for viewing and editing schedules - Update README with viewing methods, editing examples, and service documentation
- Add comprehensive documentation for schedule calendar card - Include installation instructions for HTML Jinja2 Template card - Provide full card configuration with color-coded weekly calendar view - Document features, customization options, and prerequisites
|
Thanks for submitting this! I will review it when I have time, so I can understand what it's doing. |
|
@nowjon I am going to close this PR, as I took it and ran with it to update it even further with more changes. |
WARNING
This was vibe-coded with Claude. I am no developer but wanted to add being able to view the schedule from Home Assistant :)
Summary
This PR enhances the Power Pet Door integration with improved schedule viewing capabilities, a new service for programmatic schedule updates, and comprehensive documentation including a visual calendar card.
Changes
1. Enhanced Schedule Viewing
schedule_entriesattribute showing formatted schedule times (e.g., "Mon, Wed, Fri: 06:00-20:00")schedule_countattribute displaying the number of active schedule entriesextra_state_attributesto provide a clear summary of active schedules2. New Service for Schedule Updates
powerpetdoor.update_scheduleservice for programmatic schedule updates3. Schedule Export and Backup
{HA_CONFIG_DIR}/powerpetdoor/exports/4. Bug Fixes
async_update_configwhereself.coordinator.data.items()was incorrectly used on a list5. Documentation Enhancements
Files Changed
custom_components/powerpetdoor/schedule.py- Enhanced schedule entity with attributes, service handler, and export functionalitycustom_components/powerpetdoor/const.py- Added service-related constantscustom_components/powerpetdoor/__init__.py- Integrated service setupREADME.md- Added comprehensive schedule viewing/editing documentation and calendar card exampleimages/PedDoorSchedule.png- Added screenshot of the schedule calendar cardTesting
Breaking Changes
None - all changes are backward compatible.
Related Issues
This PR addresses the need for better schedule visibility and management within Home Assistant.