npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kipk/ha-multi-entity-selector

v0.0.8

Published

A Home Assistant multi-entity selector component for custom cards

Readme

Home Assistant Multi-Entity Selector

A reusable web component for selecting and managing multiple entities in Home Assistant custom cards. It mimics the "entities" home-assistant card configuration screen.

image

Features

  • Select multiple Home Assistant entities
  • Drag and drop reordering of entities
  • Edit entity display names and icons
  • Prevent duplicate entity selections
  • Fully compatible with Home Assistant's design system
  • Easy to integrate into any custom card

Installation

npm i @kipk/ha-multi-entity-selector

Usage

Basic Usage

import { MultiEntitySelector } from 'ha-multi-entity-selector';

// The component is automatically registered as 'multi-entity-selector'

// In your render method:
render() {
  return html`
    <multi-entity-selector
      .hass=${this.hass}
      .entities=${this.config.entities || []}
      label="Select Entities"
      @entities-changed=${this._entitiesChanged}
    ></multi-entity-selector>
  `;
}

// Handle changes
_entitiesChanged(ev) {
  const entities = ev.detail.entities;
  // Do something with the updated entities
  console.log('Entities updated:', entities);
}

Input Format

The component accepts an array of entity IDs (strings) or entity configuration objects:

// Simple format with just entity IDs
const entities = [
  'light.living_room',
  'switch.tv',
  'sensor.temperature'
];

// Advanced format with additional configuration
const entitiesWithConfig = [
  'light.living_room',
  {
    entity: 'switch.tv',
    name: 'Television',
    icon: 'mdi:television'
  },
  'sensor.temperature'
];

Output Format

The component always outputs an array of entity configuration objects through the entities-changed event:

// Output format
[
  { entity: 'light.living_room' },
  { entity: 'switch.tv', name: 'Television', icon: 'mdi:television' },
  { entity: 'sensor.temperature' }
]

Properties

| Property | Type | Description | |-----------|-------------------------------|--------------------------------------------------| | hass | HomeAssistant | Home Assistant object (required) | | entities | (string | EntityConfig)[] | Array of entity IDs or configuration objects | | label | string | Optional label for the component |

Events

| Event | Detail | Description | |-------------------|------------------------------|--------------------------------------------------| | entities-changed | { entities: EntityConfig[] } | Fired when the entities array changes |

Types

interface EntityConfig {
  entity?: string;  // Entity ID
  name?: string;    // Display name
  icon?: string;    // Icon (mdi:icon-name format)
  type?: string;    // For special row types
  [key: string]: any; // Other properties
}

Dependencies

This component requires the following Home Assistant components to be available:

  • ha-form
  • ha-icon-button
  • ha-entity-picker
  • ha-dialog
  • ha-sortable
  • ha-svg-icon

These components are automatically loaded by the package when used in a Home Assistant environment.

Development

Setup

git clone [repository-url]
cd ha-multi-entity-selector
npm install

Build

npm run build

Run Demo

npm start

License

MIT