Skip to content

Releases: eyalgal/hatch-card

v1.4.2 - Fix card size and narrow-width layout

19 Apr 19:52

Choose a tag to compare

Fixes

  • Card height respects enabled rows again. getLayoutOptions() / getCardSize() were regressed in v1.4.0 to always report a single row, so enabling controls like sound, timer, brightness, volume slider, scenes or toddler lock got clipped in the HA sections layout. The card now grows with the number of always-visible controls while still allowing you to resize it down manually.
  • Narrow-width layout on mobile. Added min-width: 0 and switched to flex: 1 1 auto on the header/info containers so long names no longer push the card past its column on narrow phone screens

v1.4.1 - Fix visual editor dropdowns on Home Assistant 2026.2+

19 Apr 04:32

Choose a tag to compare

Home Assistant 2026.2+ rewrote the internal ha-select component on top of ha-dropdown (Web Awesome), breaking visual-editor dropdowns in many custom cards. This release migrates every dropdown in the editor to the new .options API while keeping a fallback for older HA versions, so selecting Layout / Background Mode / Sound Mode works again.

🐛 Bug Fixes

  • Editor dropdowns not updating on HA 2026.2+: Layout, Background Mode, and per-scene Sound Mode dropdowns in the visual editor would silently ignore selections after the HA 2026.2 frontend update. All dropdowns have been migrated to the new ha-select .options API and now listen to both @selected and @change, so selections work across HA frontend versions. Related to home-assistant/frontend#29608.
  • Config corruption from string value-changed events: hardened _valueChanged so it only spreads e.detail.value when it's an object, preventing string values from the new ha-select / ha-entity-picker from being merged character-by-character into the card config.

v1.4.0 - Sections Layout Support & Build Tooling

16 Apr 21:43

Choose a tag to compare

Sections Layout Support

  • getLayoutOptions() for Sections Layout: The card now provides proper grid sizing hints to Home Assistant's sections layout. Horizontal layout snaps to 4 columns / 1 row, and vertical layout snaps to 2 columns / 3 rows. This prevents the card from being incorrectly sized or leaving empty space in sections-based dashboards.
  • getCardSize() for Masonry Layout: Added the standard getCardSize() method so the masonry layout engine can correctly estimate the card's height (1 row for horizontal, 3 rows for vertical).

Build Tooling

  • Rollup Bundling: Source code now lives in src/hatch-card.js. The root hatch-card.js is the built output, produced by npm run build. This matches the setup used in Simple Timer Card and Shopping List Card for a consistent development workflow across all three projects.

v1.3.1 - UI Consistency & Code Cleanup

19 Jan 23:18
486494f

Choose a tag to compare

UI Improvements

  • Rounded Corners Consistency: Updated sliders (.slider-track) and action buttons (.action-button) to inherit the card's border radius (var(--ha-card-border-radius)). This ensures they respect the user's theme settings and match the card's rounded aesthetic, fixing previous issues where elements appeared square or had hard-coded radii.

Code Maintenance

  • Clean-up: Removed significant amounts of dead, commented-out code and excessive vertical whitespace to improve file readability and maintainability.

  • Refactoring: Consolidated properties and constructor definitions for cleaner syntax.

v1.3.0 - Timer helpers + UI polish

19 Jan 19:01
fda8d0c

Choose a tag to compare

Breaking changes

  • Timer now uses a Home Assistant timer.* helper
    • timer_entity now expects a timer.* entity (not input_text).
    • Timer presets only show when timer_entity is configured.
  • Timer end actions removed from the card
    • Options like timer_action_turn_off_light, timer_action_sound_mode, etc. are no longer supported.
    • Use a Home Assistant automation for “when the timer is up” behavior.

Migration

If you are upgrading from v1.2.x (or earlier):

  1. Create a timer helper
    • Settings -> Devices & Services -> Helpers -> Create Helper -> Timer
  2. Update your card config
    • Replace timer_entity: input_text.some_helper with timer_entity: timer.some_timer
    • Keep timer_presets as-is
    • Remove all timer_action_* keys (they no longer do anything)
  3. Add an automation for timer completion
    • Trigger on timer.finished for your timer entity
    • Perform your desired actions (turn off light, stop sound, set color, etc.)
    • See README for copy-paste examples
  4. Optional: enable device timer sync
    • Set sync_hatch_timer: true if you want the card to also call the Hatch integration timer services (when supported)

Improvements

  • Icon-only tap target
    • Tap actions apply to the icon only (matches common tile behavior and prevents accidental triggers).
  • Media toggle compatibility
    • Default toggle behavior updated for Hatch media players that do not support media_play_pause / toggle and instead expose play + stop.

UI fixes

  • Spacing and sizing tuned to align better with tile-style grids in both horizontal and vertical layouts.
  • Vertical layout expand chevron placement and alignment improved.
  • Sound selector behavior and alignment improved, including better scrolling behavior on smaller devices.

Notes

  • For a richer timer UI experience, I recommend pairing Hatch Card with my Simple Timer Card.

v1.2.3 – Boolean config persistence fix

22 Sep 02:41
1844000

Choose a tag to compare

Bugfix: Boolean Fields with True Defaults Now Save false Values Properly

  • Fixed a critical bug where boolean configuration fields with default true values (such as timer_action_turn_off_light, show_volume_buttons, haptic, volume_click_control, and show_battery_percentage) would not persist explicit false values in the card editor.
  • Previously, setting these fields to false in the editor would appear correct in YAML, but upon reopening, the values reverted to true (default).
  • The root cause was that the config cleaning logic deleted any value matching the default, incorrectly removing explicit false values for fields with a default of true.
  • Now, explicit false values are preserved, while true values are cleaned from the config (using the default).
  • The editor now accurately reflects and saves your intended settings for these fields.

Summary of Fix

  • Explicit false values for affected boolean fields are retained and reflected in the editor.
  • Default true values are omitted from the config for cleanliness.
  • Non-boolean fields and other behaviors remain unchanged.

For more details, see the merged PR: #6

v1.2.2 - The Timer Synchronization Update!

15 Aug 03:27
e067764

Choose a tag to compare

This release introduces a completely overhauled and synchronized timer system, along with several key fixes and improvements.

🚀 New Features & Improvements

  • Synchronized Timers Across Dashboards: The timer functionality has been rebuilt from the ground up! When you use a timer_entity (an input_text helper), the card now saves both the countdown and the specific end-actions (light color, sound, etc.) to that central entity.
    • Set it once, see it everywhere: Set a timer on your phone, and it will appear on your wall tablet instantly.
    • Consistent results: The timer will execute the exact same actions, no matter which device you used to start it.
  • Persistent & Intelligent Timer Actions: The last used timer actions are now saved to the helper entity and become the new default for the next timer. The editor is also smart enough to read this shared state, so your configuration is always transparent and predictable.
  • Instant Feedback & Cleaner YAML: Timers now appear on the card instantly when a preset is clicked. Additionally, the UI editor now automatically removes default settings for a cleaner YAML configuration.

🐛 Bug Fixes

  • Timer Consistency: Fixed a critical bug where timer actions would not be consistent if different cards on separate dashboards had different configurations.
  • Timer Not Saving: Resolved an issue where the input_text helper entity would not update because the saved data was too long. This is the core fix for timer synchronization.
  • UI Delay: Fixed a bug where there was a delay between clicking a timer preset and the timer appearing on the card.

v1.2.1 - Scene Transitions, Volume Slider, and Major Fixes!

12 Aug 23:57
54ca352

Choose a tag to compare

This release focuses on bug fixes and quality-of-life improvements, addressing several issues reported by the community. A big thank you to everyone who provided feedback!

🚀 New Features & Improvements

  • Optional Volume Slider: You can now add a volume slider to the expanded controls for more precise volume adjustments. This can be enabled with the show_volume_slider: true option.
  • Scene Transitions: The transition option has been added to scenes, allowing you to specify a fade time in seconds. This works for both HA scenes and manual scenes configured in the card. Please note that this feature is dependent on the end device's integration supporting transitions.

🐛 Bug Fixes

  • Icon Logic Corrected: The card now correctly prioritizes the icon from the media_player entity itself over icons derived from the sound mode.
  • Tap Actions Fixed: A bug that caused tap actions to fail when a light entity was present has been resolved. Service calls are now more reliable and will correctly target the intended entity.
  • Sound Mode Visibility: The sound mode dropdown in the editor will now be hidden if the sound_mode_list attribute is not available on the media player, preventing an empty dropdown from appearing.
  • Volume in Scenes & Timers: An issue where an empty volume field in a scene or timer would default to 0% has been fixed. The volume will now remain unchanged if the field is left empty.

v1.2.0 - Persistent Timers, Sound-Only Mode, and More!

01 Aug 21:40
309e37e

Choose a tag to compare

This is a significant update focused on adding powerful new features, increasing customization, and improving the user experience for both setting up and using the card. The headline feature is a new persistent timer that survives browser reloads!

🚀 New Features

  • Persistent Sleep Timer!
    You can now link the card to an input_text helper entity using the new timer_entity option. This saves the timer's state in Home Assistant, so it will survive page reloads and stay in sync across all your devices. The card will fall back to the old local timer behavior if this entity is not provided.

  • Light Entity is Now Optional
    The card can now operate in a sound-only mode. You only need to provide the media_player_entity. If the light_entity is not configured, the card will gracefully hide all light-related controls and the main tap action will control media playback.

  • New Device Controls
    Added support for more of the Hatch device's features. Each can be enabled and linked to its corresponding entity in the card editor:

    • Toddler Lock: A toggle to enable or disable the physical buttons on your device.

    • Clock Brightness: A dedicated slider to control the brightness of the digital clock display.

    • Battery Indicator: Display the current battery level and charging status directly on the card.

✨ Improvements

  • Customizable Control Order
    You're no longer locked into the layout. A new controls_order option in the editor allows you to re-arrange the expanded controls (brightness, sound, scenes, timer, etc.) in any order you prefer.

  • Smarter Toggle Action
    The main tap/click action is now more intelligent. If a light_entity is configured, it will toggle the light. If not, it will toggle the media player (play/pause).

  • Modernized Editor Experience
    The card editor has been upgraded to use Home Assistant's modern ha-entity-picker and ha-icon-picker. This makes finding and selecting your entities and icons much easier and more reliable.

  • UI Polish

    • The scene editor now includes a "Done" button, making the editing workflow clearer.

    • Configuration is now organized into collapsible sections for easier navigation.

🐛 Bug Fixes

  • Corrected a minor issue with a duplicate color definition in the internal color map.

  • Cleaned up various minor code inconsistencies.

v1.1.2 - Enhanced Controls & Fixes

30 Jul 20:30
8bacd8f

Choose a tag to compare

✨ New Features

  • Show Brightness When Off: You can now configure the brightness slider to be visible even when the Hatch light is off! You can find the new "Show Brightness When Off" toggle in the card editor under Control Options. (Note: "Show Brightness Control" must be enabled for this option to be available).

🐛 Bug Fixes & Improvements

  • Volume Presets Visibility: The volume presets will now correctly display in the expanded controls whenever they are configured. Previously, they would only appear if the "Show Expand Button" was also enabled. Now, they will show up as long as you have presets defined, whether you use the expand button or have the controls always visible.