Skip to content

1.0.0

Choose a tag to compare

@mutilator mutilator released this 14 Feb 01:52

[1.0.0]

Clockwork: Advanced Date, Time & Duration Calculations for Home Assistant

Key Features

Core Calculations:

  • Timespan Calculations: Measure duration since entity state changes with configurable tracking modes and update intervals
  • Offset Calculations: Time-delayed triggers with pulse, duration, and latch modes
  • Datetime Offset: Apply positive or negative time offsets to datetime entities
  • Date Range Duration: Calculate elapsed time between two datetime entities
  • Binary Sensors: Between/Outside dates checks with support for recurring, overnight, and multi-day ranges

Specialized Detection:

  • Season Detection: Automatically detect current season with hemisphere support
  • Month Detection: Check if current date is within specified months
  • Holiday Countdown: Count days until 11 preset US holidays or custom user-defined dates
  • Custom Holidays: Define fixed date, nth weekday, or last weekday holidays for countdowns
  • Holiday Entities: Auto-create holiday countdown sensors that update automatically

User Experience & Operations:

  • Intuitive UI: No YAML required—all configuration through Home Assistant's options flow
  • Entity Configuration Details: View calculation configuration directly in entity details page via extra state attributes
  • Diagnostics Support: Download diagnostic data for troubleshooting and configuration inspection
  • Entity Filtering: Intelligent filter of entities based on calculation requirements
  • Error Handling: Comprehensive error handling with helpful feedback via state attributes
  • Input Validation: Real-time validation with user-friendly error messages

Developer & Automation Support:

  • Automation Scan Service: Built-in clockwork.scan_automations service to help identify automations that could benefit from Clockwork calculations
  • Timezone Handling: Automatic timezone-aware datetime comparisons with fallback support
  • Full HACS Support: Ready for HACS custom repository integration
  • Comprehensive Documentation: Complete wiki with examples and automation templates

Quality Assurance

  • Complete Test Suite: 230+ unit tests ensuring reliability and correctness
  • Continuous Integration: GitHub Actions CI/CD workflows for automated testing