No description
Find a file
Ole-Morten Duesund d5dcf85432 Comprehensive documentation review and enhancement
Documentation Improvements:
- Enhanced README.md with Radio Browser integration details
- Added dedicated Radio Browser setup section with NRK P2 featured station
- Updated feature list and file inventory to include new automation tools
- Added prominent Quick Start Guide link for new users

CLAUDE.md Updates:
- Updated repository structure with complete scripts directory mapping
- Added Python code style guidelines (PEP 8, black, pylint standards)
- Documented all automation scripts and their specific purposes
- Enhanced common tasks with setup script usage and code quality commands
- Added Radio Browser integration patterns and media source formats
- Updated dependencies and installation process workflow

New Quick Start Guide:
- Created QUICK_START.md for 5-minute setup experience
- Step-by-step workflow from download to working alarm clock
- Radio station discovery examples with command-line tools
- Troubleshooting table for common setup issues
- Cross-references to detailed documentation sections

Dashboard Documentation:
- Added radio_dashboard.yaml to available layout options
- Created Radio Browser requirements section with setup prerequisites
- Enhanced installation guide with Radio Browser integration steps

User Experience:
- Multi-level documentation approach (quick start vs comprehensive)
- Clear visual formatting with emojis, code blocks, and tables
- Proper cross-linking between related documentation sections
- Complete coverage of all new features and automation capabilities

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-21 14:14:20 +02:00
blueprints/automation Add Radio Browser integration and comprehensive code linting 2025-08-21 14:06:43 +02:00
dashboards Initial release of Flexible Alarm Clock Blueprint 2025-08-21 13:18:57 +02:00
docs Initial release of Flexible Alarm Clock Blueprint 2025-08-21 13:18:57 +02:00
scripts Comprehensive documentation review and enhancement 2025-08-21 14:14:20 +02:00
.gitignore Initial release of Flexible Alarm Clock Blueprint 2025-08-21 13:18:57 +02:00
CLAUDE.md Comprehensive documentation review and enhancement 2025-08-21 14:14:20 +02:00
QUICK_START.md Comprehensive documentation review and enhancement 2025-08-21 14:14:20 +02:00
README.md Comprehensive documentation review and enhancement 2025-08-21 14:14:20 +02:00

Flexible Alarm Clock Blueprint for Home Assistant

A powerful yet simple alarm clock system using Home Assistant Blueprints. No HACS required!

🚀 New User? Start with the Quick Start Guide for 5-minute setup!

Features

  • 🗓️ Different alarm times for each day of the week
  • 🏖️ Vacation mode - disable all alarms while keeping settings
  • 📅 Tomorrow override - set a different time just for tomorrow
  • 💡 Wake-up actions - automatically open blinds, turn on lights, play radio
  • 📻 Radio Browser integration - access thousands of internet radio stations
  • 🎯 Simple Blueprint setup - configure everything through the UI
  • 🔔 Event triggers - integrate with other automations

📦 Installation

For automatic generation of helper entities and dashboard configurations:

  1. Clone or download this repository
  2. Run the setup script:
    cd scripts
    python3 setup.py
    
  3. Follow the generated guides:
    • scripts/helper_setup_guide.md - Step-by-step helper creation
    • scripts/dashboard_installation_guide.md - Dashboard setup options
    • Choose from 4 dashboard layouts: minimal, compact, detailed, or radio management

📋 Manual Setup

Step 1: Create Helper Entities

Create these helper entities via Settings → Devices & Services → Helpers:

  1. Toggle (input_boolean) helpers:

    • alarm_master_enabled - Master on/off switch
    • alarm_vacation_mode - Vacation mode toggle
    • alarm_tomorrow_override_enabled - Enable tomorrow's override
  2. Date and/or time (input_datetime) helper:

    • alarm_tomorrow_override - Time only, for tomorrow's override

Alternatively, copy the configuration from docs/helper_entities.yaml to your configuration.yaml

Step 2: Import the Blueprint

  1. Copy this URL:

    https://kode.naiv.no/olemd/ha-alarmclock-blueprint/raw/branch/main/blueprints/automation/flexible_alarm_clock.yaml
    
  2. Go to Settings → Automations & Scenes → Blueprints

  3. Click Import Blueprint (bottom right)

  4. Paste the URL and click Preview

  5. Click Import Blueprint

Step 3: Create Your Alarm Automation

  1. Click Create Automation from the imported blueprint

  2. Configure your settings:

    • Set wake-up times for each day
    • Choose which days are enabled
    • Select your helper entities
    • Pick devices for wake-up actions (blinds, lights, media players)
  3. Save the automation

Step 4: Add Dashboard Card (Optional)

Add the example dashboard cards from dashboards/alarm_clock_dashboard.yaml to your Lovelace UI, or use the generated dashboard configurations from the automated setup.

🎮 Usage

Basic Operation

  • Enable/Disable: Toggle alarm_master_enabled
  • Vacation Mode: Toggle alarm_vacation_mode to disable all alarms temporarily
  • Tomorrow Override:
    1. Set time in alarm_tomorrow_override
    2. Enable alarm_tomorrow_override_enabled

Changing Schedule

Edit your alarm automation in Settings → Automations & Scenes to adjust times and days.

Wake-up Actions

The blueprint supports:

  • Blinds/Covers: Opens selected covers
  • Lights: Turns on with configurable brightness
  • Media Players: Plays radio or music
  • Events: Fires alarm_clock_triggered event for custom automations

📻 Radio Browser Setup

Quick Radio Setup

  1. Install Radio Browser Integration:

    • Go to Settings → Devices & Services → Add Integration
    • Search for and install "Radio Browser"
  2. Find Radio Stations:

    # Find popular stations
    python3 scripts/radio_browser_helper.py --popular
    
    # Search by country (e.g., Norway)
    python3 scripts/radio_browser_helper.py --country NO
    
    # Search by name
    python3 scripts/radio_browser_helper.py --search "BBC"
    
  3. Configure in Blueprint:

    • Copy the Media Source ID from the search results
    • In your alarm automation, set "Radio Source Type" to "Radio Browser"
    • Paste the Media Source ID in the "Radio Browser Station ID" field
  • NRK P2 (Norway): High-quality classical and cultural radio
  • Pre-configured as the default Radio Browser station
  • 158 kbps AAC+ quality for excellent sound

🛠️ Advanced Configuration

Listening for Alarm Events

Create automations that respond to the alarm:

trigger:
  - platform: event
    event_type: alarm_clock_triggered
action:
  # Your custom actions here

Pre-alarm Actions

The blueprint includes a pre-alarm time setting for gradual wake-up (lights slowly brightening, etc.).

📝 Files in This Repository

  • blueprints/automation/flexible_alarm_clock.yaml - Main blueprint file
  • docs/helper_entities.yaml - Helper entity configuration examples
  • dashboards/alarm_clock_dashboard.yaml - Example dashboard cards
  • scripts/ - Automated setup tools:
    • setup.py - Master setup script
    • generate_helpers.py - Helper entities generator
    • generate_dashboard.py - Dashboard configurations generator
    • radio_browser_helper.py - Radio station discovery and management
  • README.md - This file
  • CLAUDE.md - Development guide for Claude Code

🤝 Contributing

Feel free to submit issues and pull requests to improve the blueprint!

📄 License

MIT License - Use freely!

🙏 Support

If you find this useful, consider starring the repository!