HA White Noise Component

No description provided

About This Project

HA-White-Noise-Component is a custom Home Assistant Lovelace card written in TypeScript that lets users control ambient noise playback on a media_player speaker directly from a Home Assistant dashboard. It offers white, brown, pink, rain, and rain-plus-white combination noise on seamless three-minute loops, along with play, pause, stop, volume, and noise type controls, a preset sleep timer with a live countdown, and a visual editor for configuration. Each card instance binds to a specific speaker entity and remembers the last used noise type and volume.

A notable part of the project is its compatibility handling for Music Assistant and Snapcast speakers. Standard media_player.play_media calls fail with these players, so the card uses the music_assistant.play_announcement service to send audio to the speaker via a URL served from Home Assistant's /local/ static path, while volume and stop use standard media_player services. The README documents a table of approaches that did not work, which is useful reference for anyone integrating Music Assistant players with custom cards. The audio loops were generated with ffmpeg, and the repository includes the exact commands needed to regenerate them.

This project may be useful to parents setting up white noise in nurseries, to people who want sleep or focus sound in bedrooms, and to Home Assistant users running Music Assistant or Snapcast who need a working playback method for custom dashboard cards. It can be installed manually or through HACS.

Project Details

Explore More Projects