Releases: eyalgal/hatch-card
v1.4.2 - Fix card size and narrow-width layout
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: 0and switched toflex: 1 1 autoon 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+
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.optionsAPI and now listen to both@selectedand@change, so selections work across HA frontend versions. Related to home-assistant/frontend#29608. - Config corruption from string
value-changedevents: hardened_valueChangedso it only spreadse.detail.valuewhen it's an object, preventing string values from the newha-select/ha-entity-pickerfrom being merged character-by-character into the card config.
v1.4.0 - Sections Layout Support & Build Tooling
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 standardgetCardSize()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 roothatch-card.jsis the built output, produced bynpm 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
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
propertiesandconstructordefinitions for cleaner syntax.
v1.3.0 - Timer helpers + UI polish
Breaking changes
- Timer now uses a Home Assistant
timer.*helpertimer_entitynow expects atimer.*entity (notinput_text).- Timer presets only show when
timer_entityis 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.
- Options like
Migration
If you are upgrading from v1.2.x (or earlier):
- Create a timer helper
- Settings -> Devices & Services -> Helpers -> Create Helper -> Timer
- Update your card config
- Replace
timer_entity: input_text.some_helperwithtimer_entity: timer.some_timer - Keep
timer_presetsas-is - Remove all
timer_action_*keys (they no longer do anything)
- Replace
- Add an automation for timer completion
- Trigger on
timer.finishedfor your timer entity - Perform your desired actions (turn off light, stop sound, set color, etc.)
- See README for copy-paste examples
- Trigger on
- Optional: enable device timer sync
- Set
sync_hatch_timer: trueif you want the card to also call the Hatch integration timer services (when supported)
- Set
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/toggleand instead expose play + stop.
- Default toggle behavior updated for Hatch media players that do not support
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
Bugfix: Boolean Fields with True Defaults Now Save false Values Properly
- Fixed a critical bug where boolean configuration fields with default
truevalues (such astimer_action_turn_off_light,show_volume_buttons,haptic,volume_click_control, andshow_battery_percentage) would not persist explicitfalsevalues in the card editor. - Previously, setting these fields to
falsein the editor would appear correct in YAML, but upon reopening, the values reverted totrue(default). - The root cause was that the config cleaning logic deleted any value matching the default, incorrectly removing explicit
falsevalues for fields with a default oftrue. - Now, explicit
falsevalues are preserved, whiletruevalues 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
falsevalues for affected boolean fields are retained and reflected in the editor. - Default
truevalues 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!
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!
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: trueoption. - Scene Transitions: The
transitionoption 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_playerentity 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_listattribute 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!
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 aninput_texthelper entity using the newtimer_entityoption. 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 themedia_player_entity. If thelight_entityis 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 newcontrols_orderoption 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 alight_entityis 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 modernha-entity-pickerandha-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
✨ 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.