Giter Site home page Giter Site logo

shannonhochkins / ha-component-kit Goto Github PK

View Code? Open in Web Editor NEW
335.0 16.0 21.0 154.47 MB

A Home Assistant React component library to generate dashboards with ease, This utilizises a massive list of Components / cards to use out of the box, a large range of hooks to build your own custom functionality, and a hell of a lot more! It's using web sockets to retrieve information from your home assistant instance so there's 0 latency!

Home Page: https://shannonhochkins.github.io/ha-component-kit/

JavaScript 0.47% TypeScript 95.98% MDX 3.42% CSS 0.06% Dockerfile 0.07%
component components dashboard home-assistant homeassistant homeassistant-custom-component homeassistant-frontend homeassistant-integration hooks react

ha-component-kit's Introduction

G'day! 👋

Welcome to my page!

I'm Shannon.
Technical developer who loves a challenge.
Open to collaborating on interesting and innovative projects.

LinkedIn

Languages / TECH

JavaScript Node.js React HTML5 CSS3 Typescript Docker AWS

OS

Linux Windows OSX

ha-component-kit's People

Contributors

jenseo avatar koriwi avatar shannonhochkins avatar yann510 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ha-component-kit's Issues

License status

Hey, thanks for the cool work on this!

Some of the code seems to be licensed under the standard ISC license, but the core component seems to have a non standard, custom license. Could you clarify the exact status here?

I want to use the library with next.js but i got error only in building

I want to use the library with Next.js but i got error only in building

The error is this:
unhandledRejection: ReferenceError: location is not defined
at eval (webpack-internal:///(ssr)/./node_modules/@hakit/core/dist/hakit-core.es.js:533:5)
at Xe (webpack-internal:///(ssr)/./node_modules/@hakit/core/dist/hakit-core.es.js:658:41)

It's like the library is using "location" and it's not possibile with Next.js instead of vanilla React

Do you know why and how i can fix it?

window is not defined when upgrading to 1.0.13

I have a fully working dashboard and I've just upgraded to hakit/components v1.0.13 and hakit/core v1.0.11 - I made no other changes, and when I run npm run dev I'm getting the dreaded window is not defined error.

image

If I revert back to hakit/components v1.0.7 and hakit/core v1.0.4 I am able to npm install and npm run dev with no issues. I would like to use the ClimateCard :(

Any idea as to why this would be the issue

Many thanks for your great work, I'm trying to understand the codebase so I can hopefully contribute to this.

MediaPlayerCard improvements

  • Add a modal or dropdown to select which speakers should be part of the group
  • Fix artworkUrl as in my case it doesn't return the full URL, I need to append the home assistant URL to it
  • Display all grouped speakers as the friendly entity name

The goal for me would be that this card can act as the single controller for all of my media entities.

@shannonhochkins I'd love to hear your thoughts on this, especially the first point :)
If you have other ideas, I'm very open to them.

Area Summary Card

Quite a few themes/setups have an overview of the area, with some quick actions potentially. E.g. showing the lights are on/off current temperature etc. I was wondering if that would be an enhancement you are interested in

Full example code similar to Demo dashboard

Is your feature request related to a problem? Please describe.
I'm not a developer but would like to test your dashboard. It will be good to have an full example code similar to your demo dashboard, where user can simply change entities to his own. And as a result to play with components.

Thanks.

useAreas not reporting moved entities correctly

Describe the bug
I have a multi split AC in our house. but every indoor unit also reports the outside temperature sensor (basically i get 5x the same sensor). so i hid 4 of them and used one of them for the garden temperature sensor.
the sensor i use for the garden, i moved the entity into the area "garden", still shows up under the area "office" where the parent device is in. this bug only revealed itself, because my filtering for "attributes.hidden" also does not work because the field is just undefined even though i have hidden all the outside sensors. disabling them works for 4 of my 5 ACs. But i cannot disable it for my office because then i would lose the garden temp.

The entity also shows up correctly in the garden!

To Reproduce
Steps to reproduce the behavior:

  1. take a device with multiple entities.
  2. move the device into an area.
  3. move an entity of this device into another area
  4. const areas = useAreas();
  5. log the entities of your device area. the entity still shows up in the same area

Expected behavior
The moved entity should only show up in its area and not the area of its parent device

Screenshots / code examples
This screenshot should illustrate the device <-> entity difference when it comes to areas
Screenshot 2023-11-21 at 00 55 19

ctrl+f for `sensor.klimaanlage_buro_outdoor` in this json
[
    {
        "aliases": [],
        "area_id": "buro_kilian",
        "name": "Büro",
        "picture": "https://home.gosewis.ch/api/image/serve/bce805de50e6f69bef6ddde134427e88/512x512",
        "devices": [
            {
                "area_id": "buro_kilian",
                "configuration_url": null,
                "config_entries": [
                    "a9bd2b722f91d7be7898de0f242dc768",
                    "51234ef51dc40c0e48fcb81aa5447649"
                ],
                "connections": [],
                "disabled_by": null,
                "entry_type": null,
                "hw_version": null,
                "id": "925c0b6e42e54922a97194c207ccd287",
                "identifiers": [
                    [
                        "mqtt",
                        "zigbee2mqtt_0xeeee0302010373a4"
                    ]
                ],
                "manufacturer": "Müller Licht",
                "model": "Tint smart switch (404021)",
                "name_by_user": null,
                "name": "büro/lichtschalter",
                "serial_number": null,
                "sw_version": "2.5.3_r47",
                "via_device_id": null
            },
            {
                "area_id": "buro_kilian",
                "configuration_url": null,
                "config_entries": [
                    "1f552b73fab30f4f0627f0046ce9da43"
                ],
                "connections": [],
                "disabled_by": "config_entry",
                "entry_type": null,
                "hw_version": null,
                "id": "6ef4b6abbe12ff80cbd05aa8614fefac",
                "identifiers": [
                    [
                        "moonraker",
                        "1f552b73fab30f4f0627f0046ce9da43"
                    ]
                ],
                "manufacturer": "moonraker",
                "model": "moonraker",
                "name_by_user": null,
                "name": "Quantum Delta",
                "serial_number": null,
                "sw_version": null,
                "via_device_id": null
            },
            {
                "area_id": "buro_kilian",
                "configuration_url": null,
                "config_entries": [
                    "13d97f1ac6a5ecf8654e414a82a1ae78"
                ],
                "connections": [],
                "disabled_by": null,
                "entry_type": null,
                "hw_version": null,
                "id": "f3bddbdd0a4c5f973e292ec45c82a89c",
                "identifiers": [
                    [
                        "mitsubishi_wf_rac",
                        "ec0baef684a4"
                    ]
                ],
                "manufacturer": "Mitsubishi (WF-RAC)",
                "model": null,
                "name_by_user": "Klimaanlage Büro",
                "name": "Airco ec0baef684a4",
                "serial_number": null,
                "sw_version": "WF-RAC, mcu: 123, wireless: 010",
                "via_device_id": null
            },
            {
                "area_id": "buro_kilian",
                "configuration_url": null,
                "config_entries": [
                    "a9bd2b722f91d7be7898de0f242dc768"
                ],
                "connections": [],
                "disabled_by": null,
                "entry_type": null,
                "hw_version": null,
                "id": "cfbe736c4160f0819bf4fdd47e9ec761",
                "identifiers": [
                    [
                        "mqtt",
                        "zigbee2mqtt_0x0017880106a7aa73"
                    ]
                ],
                "manufacturer": "Philips",
                "model": "Hue dimmer switch (324131092621)",
                "name_by_user": null,
                "name": "büro/fernbedienung",
                "serial_number": null,
                "sw_version": "6.1.1.28573",
                "via_device_id": null
            },
            {
                "area_id": "buro_kilian",
                "configuration_url": null,
                "config_entries": [
                    "a9bd2b722f91d7be7898de0f242dc768"
                ],
                "connections": [],
                "disabled_by": null,
                "entry_type": null,
                "hw_version": null,
                "id": "d625ff562bbb07f318a286c364e343b7",
                "identifiers": [
                    [
                        "mqtt",
                        "zigbee2mqtt_0x003c84fffef99020"
                    ]
                ],
                "manufacturer": "Moes",
                "model": "Moes BHT series Thermostat (BHT-002-GCLZB)",
                "name_by_user": null,
                "name": "büro/thermostat",
                "serial_number": null,
                "sw_version": null,
                "via_device_id": null
            },
            {
                "area_id": "buro_kilian",
                "configuration_url": null,
                "config_entries": [
                    "a9bd2b722f91d7be7898de0f242dc768"
                ],
                "connections": [],
                "disabled_by": null,
                "entry_type": null,
                "hw_version": null,
                "id": "0321f545fac6fea5f4e88b35c798e92c",
                "identifiers": [
                    [
                        "mqtt",
                        "zigbee2mqtt_0x00158d000945e030"
                    ]
                ],
                "manufacturer": "Xiaomi",
                "model": "Aqara door & window contact sensor (MCCGQ11LM)",
                "name_by_user": null,
                "name": "büro/fenster/status",
                "serial_number": null,
                "sw_version": "3000-0001",
                "via_device_id": null
            },
            {
                "area_id": "buro_kilian",
                "configuration_url": null,
                "config_entries": [
                    "5b905a7a275eb7401b2229b3e77c5f18"
                ],
                "connections": [],
                "disabled_by": null,
                "entry_type": null,
                "hw_version": null,
                "id": "8f78aa80ab7497976e3bf84190a12457",
                "identifiers": [
                    [
                        "mjpeg",
                        "5b905a7a275eb7401b2229b3e77c5f18"
                    ]
                ],
                "manufacturer": null,
                "model": null,
                "name_by_user": null,
                "name": "Quantum Delta",
                "serial_number": null,
                "sw_version": null,
                "via_device_id": null
            },
            {
                "area_id": "buro_kilian",
                "configuration_url": null,
                "config_entries": [
                    "4804887d8bac39ad521b929e78a409f9"
                ],
                "connections": [
                    [
                        "mac",
                        "98:f4:ab:63:e2:ec"
                    ]
                ],
                "disabled_by": null,
                "entry_type": null,
                "hw_version": null,
                "id": "a616f975082b62635aa40780b0f1d845",
                "identifiers": [],
                "manufacturer": "Espressif",
                "model": "nodemcu-32s",
                "name_by_user": null,
                "name": "ESPHome Audio Test",
                "serial_number": null,
                "sw_version": "2023.10.6 (Nov 19 2023, 01:09:19)",
                "via_device_id": null
            },
            {
                "area_id": "buro_kilian",
                "configuration_url": null,
                "config_entries": [
                    "a9bd2b722f91d7be7898de0f242dc768"
                ],
                "connections": [],
                "disabled_by": null,
                "entry_type": null,
                "hw_version": null,
                "id": "33759ae3d21139b51f1a5bfcef61e35e",
                "identifiers": [
                    [
                        "mqtt",
                        "zigbee2mqtt_0x7cb03eaa0a09b6be"
                    ]
                ],
                "manufacturer": "OSRAM",
                "model": "Smart+ plug (AB3257001NJ)",
                "name_by_user": null,
                "name": "büro/werkbank/steckdose/slave",
                "serial_number": null,
                "sw_version": "V1.05.09",
                "via_device_id": null
            },
            {
                "area_id": "buro_kilian",
                "configuration_url": null,
                "config_entries": [
                    "a9bd2b722f91d7be7898de0f242dc768"
                ],
                "connections": [],
                "disabled_by": null,
                "entry_type": null,
                "hw_version": null,
                "id": "c30442330fea3c7c99fd94d45d5fdb4f",
                "identifiers": [
                    [
                        "mqtt",
                        "zigbee2mqtt_0xa4c1380dc128a08e"
                    ]
                ],
                "manufacturer": "TuYa",
                "model": "Human presence sensor (RTX PRO)",
                "name_by_user": null,
                "name": "büro/werkbank/anwesenheit",
                "serial_number": null,
                "sw_version": null,
                "via_device_id": null
            }
        ],
        "services": [],
        "entities": [
            {
                "entity_id": "person.kilian_gosewisch",
                "state": "home",
                "attributes": {
                    "editable": true,
                    "id": "kilian_gosewisch",
                    "latitude": 52.3142992,
                    "longitude": 13.2144835,
                    "gps_accuracy": 100,
                    "source": "device_tracker.oneplus_7t",
                    "user_id": "bc4aebd4cf0147e8bab580ce5f565d80",
                    "device_trackers": [
                        "device_tracker.oneplus_7t"
                    ],
                    "friendly_name": "Kilian Gosewisch"
                },
                "context": {
                    "id": "01HFQHV3NRP6J8TGWJE5JX9WQW",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:45.753Z",
                "last_updated": "2023-11-20T23:42:53.624Z"
            },
            {
                "entity_id": "climate.klimaanlage_buro",
                "state": "off",
                "attributes": {
                    "hvac_modes": [
                        "off",
                        "auto",
                        "cool",
                        "dry",
                        "heat",
                        "fan_only"
                    ],
                    "min_temp": 16,
                    "max_temp": 30,
                    "fan_modes": [
                        "auto",
                        "1 Lowest",
                        "2 Low",
                        "3 High",
                        "4 Highest"
                    ],
                    "swing_modes": [
                        "Up/Down Auto",
                        "Highest",
                        "Middle",
                        "Normal",
                        "Lowest",
                        "3D Auto"
                    ],
                    "current_temperature": 24.2,
                    "temperature": 24,
                    "fan_mode": "2 Low",
                    "swing_mode": "Middle",
                    "friendly_name": "Klimaanlage",
                    "supported_features": 41
                },
                "context": {
                    "id": "01HFQHV0MEHQ270QX5KDT7CFWX",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:50.510Z",
                "last_updated": "2023-11-20T23:42:50.510Z"
            },
            {
                "entity_id": "sensor.klimaanlage_buro_accounts",
                "state": "4",
                "attributes": {
                    "unit_of_measurement": "Accounts",
                    "icon": "mdi:account-group",
                    "friendly_name": "Klimaanlage Büro Accounts"
                },
                "context": {
                    "id": "01HFQHV0Q3G8R7X5Z0Q25BYB4R",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:50.595Z",
                "last_updated": "2023-11-20T23:42:50.595Z"
            },
            {
                "entity_id": "sensor.klimaanlage_buro_device_id",
                "state": "homeassistant-device-21555413aab",
                "attributes": {
                    "friendly_name": "Klimaanlage Büro Device ID"
                },
                "context": {
                    "id": "01HFQHV0Q3EHQM4QDJXFE3DBNE",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:50.595Z",
                "last_updated": "2023-11-20T23:42:50.595Z"
            },
            {
                "entity_id": "sensor.klimaanlage_buro_energy_usage_cycle",
                "state": "0.0",
                "attributes": {
                    "state_class": "total_increasing",
                    "unit_of_measurement": "kWh",
                    "device_class": "energy",
                    "friendly_name": "Klimaanlage Büro energy usage cycle"
                },
                "context": {
                    "id": "01HFQHV0Q3D13P0KXT394KJ4E7",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:50.595Z",
                "last_updated": "2023-11-20T23:42:50.595Z"
            },
            {
                "entity_id": "select.klimaanlage_buro_horizontal_swing_direction",
                "state": "Center-Center",
                "attributes": {
                    "options": [
                        "Left/Right Auto",
                        "Left-Left",
                        "Left-Center",
                        "Center-Center",
                        "Center-Right",
                        "Right-Right",
                        "Left-Right",
                        "Right-Left"
                    ],
                    "icon": "mdi:weather-dust",
                    "friendly_name": "Klimaanlage Horizontal"
                },
                "context": {
                    "id": "01HFQHV0ME8NHSBKA2K1GA1AAQ",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:50.510Z",
                "last_updated": "2023-11-20T23:42:50.510Z"
            },
            {
                "entity_id": "sensor.klimaanlage_buro_indoor",
                "state": "24.2",
                "attributes": {
                    "state_class": "measurement",
                    "unit_of_measurement": "°C",
                    "device_class": "temperature",
                    "friendly_name": "Klimaanlage"
                },
                "context": {
                    "id": "01HFQHV0Q2MQ4SNEM4RNGPD0JV",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:50.594Z",
                "last_updated": "2023-11-20T23:42:50.594Z"
            },
            {
                "entity_id": "sensor.klimaanlage_buro_ip",
                "state": "192.168.1.155",
                "attributes": {
                    "friendly_name": "Klimaanlage Büro IP"
                },
                "context": {
                    "id": "01HFQHV0Q37VVKQ9KTV6MPXF4Q",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:50.595Z",
                "last_updated": "2023-11-20T23:42:50.595Z"
            },
            {
                "entity_id": "sensor.klimaanlage_buro_operator_id",
                "state": "hassio-7-0218-499d-bee3-eab90d34215e",
                "attributes": {
                    "friendly_name": "Klimaanlage Büro Operator ID"
                },
                "context": {
                    "id": "01HFQHV0Q3GQNP0RW3HEH4GMBE",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:50.595Z",
                "last_updated": "2023-11-20T23:42:50.595Z"
            },
            {
                "entity_id": "sensor.klimaanlage_buro_outdoor",
                "state": "8.5",
                "attributes": {
                    "state_class": "measurement",
                    "unit_of_measurement": "°C",
                    "device_class": "temperature",
                    "friendly_name": "Temperatur"
                },
                "context": {
                    "id": "01HFQJHX59PKS8NP4KHK8EXNEH",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:55:20.617Z",
                "last_updated": "2023-11-20T23:55:20.617Z"
            },
            {
                "entity_id": "sensor.buro_fernbedienung_battery",
                "state": "100",
                "attributes": {
                    "state_class": "measurement",
                    "unit_of_measurement": "%",
                    "device_class": "battery",
                    "friendly_name": "Büro Fernbedienung"
                },
                "context": {
                    "id": "01HFQHW4WH7K72SNM2AS3PKGCS",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:43:27.633Z",
                "last_updated": "2023-11-20T23:43:27.633Z"
            },
            {
                "entity_id": "sensor.buro_fernbedienung_action",
                "state": "None",
                "attributes": {
                    "icon": "mdi:gesture-double-tap",
                    "friendly_name": "büro/fernbedienung Action"
                },
                "context": {
                    "id": "01HFQHW4WH5N3C69Q954SCVJW3",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:43:27.633Z",
                "last_updated": "2023-11-20T23:43:27.633Z"
            },
            {
                "entity_id": "sensor.buro_fernbedienung_action_duration",
                "state": "unknown",
                "attributes": {
                    "unit_of_measurement": "s",
                    "friendly_name": "büro/fernbedienung Action duration"
                },
                "context": {
                    "id": "01HFQHV36HZJW6MP067C460BBN",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:53.137Z",
                "last_updated": "2023-11-20T23:42:53.137Z"
            },
            {
                "entity_id": "update.buro_fernbedienung",
                "state": "off",
                "attributes": {
                    "auto_update": false,
                    "installed_version": "1107324829",
                    "in_progress": false,
                    "latest_version": "1107324829",
                    "release_summary": null,
                    "release_url": null,
                    "skipped_version": null,
                    "title": null,
                    "device_class": "firmware",
                    "entity_picture": "https://github.com/Koenkk/zigbee2mqtt/raw/master/images/logo.png",
                    "friendly_name": "büro/fernbedienung",
                    "supported_features": 1
                },
                "context": {
                    "id": "01HFQHW4WHTQQMYQVNV1GRXRPF",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:43:27.633Z",
                "last_updated": "2023-11-20T23:43:27.633Z"
            },
            {
                "entity_id": "switch.buro_lichtschalter",
                "state": "off",
                "attributes": {
                    "friendly_name": "Deckenlampe"
                },
                "context": {
                    "id": "01HFQHW4WH6SZ87ZA0CDZDKYVT",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:43:27.633Z",
                "last_updated": "2023-11-20T23:43:27.633Z"
            },
            {
                "entity_id": "select.buro_lichtschalter_power_on_behavior",
                "state": "unknown",
                "attributes": {
                    "options": [
                        "off",
                        "on",
                        "toggle",
                        "previous"
                    ],
                    "icon": "mdi:power-settings",
                    "friendly_name": "büro/lichtschalter Power-on behavior"
                },
                "context": {
                    "id": "01HFQHV368MARHT4HZMW1K3QZ2",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:53.128Z",
                "last_updated": "2023-11-20T23:42:53.128Z"
            },
            {
                "entity_id": "lock.buro_thermostat_child_lock",
                "state": "locked",
                "attributes": {
                    "friendly_name": "büro/thermostat Child lock",
                    "supported_features": 0
                },
                "context": {
                    "id": "01HFQHV415M1ESVE4136R1T0Q6",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:53.989Z",
                "last_updated": "2023-11-20T23:42:53.989Z"
            },
            {
                "entity_id": "number.buro_thermostat_deadzone_temperature",
                "state": "1",
                "attributes": {
                    "min": 0,
                    "max": 5,
                    "step": 1,
                    "mode": "auto",
                    "unit_of_measurement": "°C",
                    "icon": "mdi:thermometer",
                    "friendly_name": "büro/thermostat Deadzone temperature"
                },
                "context": {
                    "id": "01HFQHV416ZMTV7CXFNSWVYDR6",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:53.990Z",
                "last_updated": "2023-11-20T23:42:53.990Z"
            },
            {
                "entity_id": "number.buro_thermostat_max_temperature_limit",
                "state": "35",
                "attributes": {
                    "min": 0,
                    "max": 35,
                    "step": 1,
                    "mode": "auto",
                    "unit_of_measurement": "°C",
                    "icon": "mdi:thermometer-high",
                    "friendly_name": "büro/thermostat Max temperature limit"
                },
                "context": {
                    "id": "01HFQHV4161EMYZT47S5XF2AXH",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:53.990Z",
                "last_updated": "2023-11-20T23:42:53.990Z"
            },
            {
                "entity_id": "number.buro_thermostat_min_temperature_limit",
                "state": "1",
                "attributes": {
                    "min": 1,
                    "max": 5,
                    "step": 1,
                    "mode": "auto",
                    "unit_of_measurement": "°C",
                    "icon": "mdi:thermometer-low",
                    "friendly_name": "büro/thermostat Min temperature limit"
                },
                "context": {
                    "id": "01HFQHV4163NQJZM261SVESNHG",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:53.990Z",
                "last_updated": "2023-11-20T23:42:53.990Z"
            },
            {
                "entity_id": "number.buro_thermostat_local_temperature_calibration",
                "state": "-4.0",
                "attributes": {
                    "min": -30,
                    "max": 30,
                    "step": 0.1,
                    "mode": "auto",
                    "unit_of_measurement": "°C",
                    "device_class": "temperature",
                    "icon": "mdi:math-compass",
                    "friendly_name": "büro/thermostat Local temperature calibration"
                },
                "context": {
                    "id": "01HFQHV416261EMTK5N993M67W",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:53.990Z",
                "last_updated": "2023-11-20T23:42:53.990Z"
            },
            {
                "entity_id": "climate.buro_thermostat",
                "state": "off",
                "attributes": {
                    "hvac_modes": [
                        "off",
                        "heat"
                    ],
                    "min_temp": 5,
                    "max_temp": 35,
                    "target_temp_step": 1,
                    "preset_modes": [
                        "none",
                        "hold",
                        "program"
                    ],
                    "current_temperature": 18.5,
                    "temperature": 18,
                    "hvac_action": "idle",
                    "preset_mode": "hold",
                    "friendly_name": "Heizung",
                    "supported_features": 17
                },
                "context": {
                    "id": "01HFQHW4YCEZXDB117YMZ5JEJE",
                    "parent_id": "01HFQHW4X729YXJ8306W0N3C4R",
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:53.989Z",
                "last_updated": "2023-11-20T23:43:27.950Z"
            },
            {
                "entity_id": "sensor.buro_thermostat",
                "state": "AL",
                "attributes": {
                    "friendly_name": "büro/thermostat Sensor"
                },
                "context": {
                    "id": "01HFQHV41BYXSWM3BT99THE5AK",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:53.995Z",
                "last_updated": "2023-11-20T23:42:53.995Z"
            },
            {
                "entity_id": "select.buro_thermostat_sensor",
                "state": "AL",
                "attributes": {
                    "options": [
                        "IN",
                        "AL",
                        "OU"
                    ],
                    "friendly_name": "büro/thermostat Sensor"
                },
                "context": {
                    "id": "01HFQHV416XTN0VX0B594N14CQ",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:53.990Z",
                "last_updated": "2023-11-20T23:42:53.990Z"
            },
            {
                "entity_id": "sensor.buro_thermostat_program",
                "state": "unknown",
                "attributes": {},
                "context": {
                    "id": "01HFQHV41BP86PWVZ9CCSG6V81",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:53.137Z",
                "last_updated": "2023-11-20T23:42:53.995Z"
            },
            {
                "entity_id": "sensor.buro_fenster_status_battery",
                "state": "100",
                "attributes": {
                    "state_class": "measurement",
                    "unit_of_measurement": "%",
                    "device_class": "battery",
                    "friendly_name": "Büro Fenster Sensor"
                },
                "context": {
                    "id": "01HFQHW4X8WNM223V9T9BF83BV",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:43:27.656Z",
                "last_updated": "2023-11-20T23:43:27.656Z"
            },
            {
                "entity_id": "binary_sensor.buro_fenster_status_contact",
                "state": "on",
                "attributes": {
                    "device_class": "window",
                    "icon": "mdi:window-closed-variant",
                    "friendly_name": "Fenster"
                },
                "context": {
                    "id": "01HFQHW4X729YXJ8306W0N3C4R",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:43:27.655Z",
                "last_updated": "2023-11-20T23:43:27.655Z"
            },
            {
                "entity_id": "sensor.buro_fenster_status_device_temperature",
                "state": "23",
                "attributes": {
                    "state_class": "measurement",
                    "unit_of_measurement": "°C",
                    "device_class": "temperature",
                    "friendly_name": "büro/fenster/status Temperatur"
                },
                "context": {
                    "id": "01HFQHW4X7J03N7X7YGYW3ZSE0",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:43:27.655Z",
                "last_updated": "2023-11-20T23:43:27.655Z"
            },
            {
                "entity_id": "sensor.buro_fenster_status_voltage",
                "state": "3075",
                "attributes": {
                    "state_class": "measurement",
                    "unit_of_measurement": "mV",
                    "device_class": "voltage",
                    "friendly_name": "büro/fenster/status Spannung"
                },
                "context": {
                    "id": "01HFQHW4X74CTJK0P8BQ5VMN1G",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:43:27.655Z",
                "last_updated": "2023-11-20T23:43:27.655Z"
            },
            {
                "entity_id": "sensor.buro_fenster_status_power_outage_count",
                "state": "13",
                "attributes": {
                    "friendly_name": "büro/fenster/status Power outage count"
                },
                "context": {
                    "id": "01HFQHW4X7H4JRDY4HH37YQBY1",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:43:27.655Z",
                "last_updated": "2023-11-20T23:43:27.655Z"
            },
            {
                "entity_id": "light.buro_lichtschalter",
                "state": "off",
                "attributes": {
                    "supported_color_modes": [
                        "onoff"
                    ],
                    "color_mode": null,
                    "friendly_name": "Deckenlampe",
                    "supported_features": 0
                },
                "context": {
                    "id": "01HFQHV36MDPTSJBRZ897Q2934",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:53.140Z",
                "last_updated": "2023-11-20T23:42:53.140Z"
            },
            {
                "entity_id": "camera.quantum_delta",
                "state": "idle",
                "attributes": {
                    "access_token": "5484deeae319b85de7243c10952ea198bfdef387a5559b1e7e1ec11afb687797",
                    "entity_picture": "/api/camera_proxy/camera.quantum_delta?token=5484deeae319b85de7243c10952ea198bfdef387a5559b1e7e1ec11afb687797",
                    "friendly_name": "Quantum Delta",
                    "supported_features": 0
                },
                "context": {
                    "id": "01HFQJD75DMPWDDJ6JAGXRAQ0Q",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:50.296Z",
                "last_updated": "2023-11-20T23:52:47.021Z"
            },
            {
                "entity_id": "media_player.esp32_audio_test_esphome_i2s_media_player",
                "state": "idle",
                "attributes": {
                    "volume_level": 1,
                    "is_volume_muted": false,
                    "device_class": "speaker",
                    "friendly_name": "ESPHome Audio Test ESPHome I2S Media Player",
                    "supported_features": 152077
                },
                "context": {
                    "id": "01HFQHV15RXZV92X5ZH6KCMP2P",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:51.064Z",
                "last_updated": "2023-11-20T23:42:51.064Z"
            },
            {
                "entity_id": "binary_sensor.esphome_audio_test_assist_in_verwendung",
                "state": "off",
                "attributes": {
                    "friendly_name": "ESPHome Audio Test Assist in Verwendung"
                },
                "context": {
                    "id": "01HFQHV0RFAGWM4P3WZQ7BPKPR",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:50.639Z",
                "last_updated": "2023-11-20T23:42:50.639Z"
            },
            {
                "entity_id": "select.esphome_audio_test_assist_pipeline",
                "state": "Local",
                "attributes": {
                    "options": [
                        "preferred",
                        "Home Assistant Cloud",
                        "Local"
                    ],
                    "friendly_name": "ESPHome Audio Test Assist-Pipeline"
                },
                "context": {
                    "id": "01HFQHV0RGBPEJCDQCCJNXCCSP",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:50.640Z",
                "last_updated": "2023-11-20T23:42:50.640Z"
            },
            {
                "entity_id": "select.esphome_audio_test_zu_ende_gesprochen_erkennung",
                "state": "default",
                "attributes": {
                    "options": [
                        "default",
                        "relaxed",
                        "aggressive"
                    ],
                    "friendly_name": "ESPHome Audio Test Zu Ende gesprochen Erkennung"
                },
                "context": {
                    "id": "01HFQHV0RG3YG5ZMBNN2S7AHNV",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:50.640Z",
                "last_updated": "2023-11-20T23:42:50.640Z"
            },
            {
                "entity_id": "switch.esp32_audio_test_use_wake_word",
                "state": "on",
                "attributes": {
                    "friendly_name": "ESPHome Audio Test Use Wake Word"
                },
                "context": {
                    "id": "01HFQHV145SM65GP9CQKSC3ESR",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:42:51.013Z",
                "last_updated": "2023-11-20T23:42:51.013Z"
            },
            {
                "entity_id": "switch.buro_werkbank_steckdose_slave",
                "state": "on",
                "attributes": {
                    "friendly_name": "Steckdose Werkbank"
                },
                "context": {
                    "id": "01HFQHW4XG1C6Z9JCWPRT5JSZN",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:43:27.664Z",
                "last_updated": "2023-11-20T23:43:27.664Z"
            },
            {
                "entity_id": "update.buro_werkbank_steckdose_slave",
                "state": "off",
                "attributes": {
                    "auto_update": false,
                    "installed_version": "16909577",
                    "in_progress": false,
                    "latest_version": "16909577",
                    "release_summary": null,
                    "release_url": null,
                    "skipped_version": null,
                    "title": null,
                    "device_class": "firmware",
                    "entity_picture": "https://github.com/Koenkk/zigbee2mqtt/raw/master/images/logo.png",
                    "friendly_name": "büro/werkbank/steckdose/slave",
                    "supported_features": 1
                },
                "context": {
                    "id": "01HFQHW4XGWRQW2AGA4JX9M1HK",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:43:27.664Z",
                "last_updated": "2023-11-20T23:43:27.664Z"
            },
            {
                "entity_id": "binary_sensor.buro_werkbank_anwesenheit_presence",
                "state": "off",
                "attributes": {
                    "device_class": "presence",
                    "friendly_name": "Anwesenheit"
                },
                "context": {
                    "id": "01HFQHW4Y2CFX9RBW5CSN7BH56",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:43:27.682Z",
                "last_updated": "2023-11-20T23:43:27.682Z"
            },
            {
                "entity_id": "sensor.buro_werkbank_anwesenheit_movement_type",
                "state": "none",
                "attributes": {
                    "friendly_name": "büro/werkbank/anwesenheit Movement type"
                },
                "context": {
                    "id": "01HFQHW4Y20HNXFWDWXS1FQ81V",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:43:27.682Z",
                "last_updated": "2023-11-20T23:43:27.682Z"
            },
            {
                "entity_id": "number.buro_werkbank_anwesenheit_detection_delay",
                "state": "60",
                "attributes": {
                    "min": 0,
                    "max": 600,
                    "step": 1,
                    "mode": "auto",
                    "unit_of_measurement": "s",
                    "friendly_name": "Abwesenheitsverzögerung"
                },
                "context": {
                    "id": "01HFQHW4Y1BP8G7Q41EWD4XJQ9",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:43:27.681Z",
                "last_updated": "2023-11-20T23:43:27.681Z"
            },
            {
                "entity_id": "number.buro_werkbank_anwesenheit_detection_range",
                "state": "600",
                "attributes": {
                    "min": 150,
                    "max": 600,
                    "step": 10,
                    "mode": "auto",
                    "friendly_name": "büro/werkbank/anwesenheit Detection range"
                },
                "context": {
                    "id": "01HFQHW4Y1B677TJA7K90E2W6K",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:43:27.681Z",
                "last_updated": "2023-11-20T23:43:27.681Z"
            },
            {
                "entity_id": "number.buro_werkbank_anwesenheit_radar_sensitivity",
                "state": "7",
                "attributes": {
                    "min": 0,
                    "max": 7,
                    "step": 1,
                    "mode": "auto",
                    "friendly_name": "büro/werkbank/anwesenheit Radar sensitivity"
                },
                "context": {
                    "id": "01HFQHW4Y1E0EVHKBTVG25PCVW",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:43:27.681Z",
                "last_updated": "2023-11-20T23:43:27.681Z"
            },
            {
                "entity_id": "number.buro_werkbank_anwesenheit_motion_sensitivity",
                "state": "0",
                "attributes": {
                    "min": 0,
                    "max": 7,
                    "step": 1,
                    "mode": "auto",
                    "friendly_name": "büro/werkbank/anwesenheit Motion sensitivity"
                },
                "context": {
                    "id": "01HFQHW4Y1RC5FD6YW04QM2Q5A",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:43:27.681Z",
                "last_updated": "2023-11-20T23:43:27.681Z"
            },
            {
                "entity_id": "sensor.buro_werkbank_anwesenheit_current_distance",
                "state": "264",
                "attributes": {
                    "unit_of_measurement": "cm",
                    "friendly_name": "büro/werkbank/anwesenheit Current distance"
                },
                "context": {
                    "id": "01HFQHW4Y251JJ7C4G49QBPEHB",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:43:27.682Z",
                "last_updated": "2023-11-20T23:43:27.682Z"
            },
            {
                "entity_id": "sensor.detection_distance",
                "state": "264.0",
                "attributes": {
                    "entity_id": "sensor.buro_werkbank_anwesenheit_current_distance",
                    "unit_of_measurement": "cm",
                    "icon": "mdi:chart-line-variant",
                    "friendly_name": "Werkbank Abstand"
                },
                "context": {
                    "id": "01HFQHW4YKWEJXFFEXF13F7VY6",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:43:27.699Z",
                "last_updated": "2023-11-20T23:43:27.699Z"
            }
        ]
    },
    {
        "aliases": [],
        "area_id": "garten",
        "name": "Garten",
        "picture": null,
        "devices": [],
        "services": [
            {
                "area_id": "garten",
                "configuration_url": null,
                "config_entries": [
                    "46f1e316d6999df8f44b03aaaa1c4946"
                ],
                "connections": [],
                "disabled_by": null,
                "entry_type": "service",
                "hw_version": null,
                "id": "5c3c4f4ac8fb63f72cc0c4658df9ffa0",
                "identifiers": [
                    [
                        "openweathermap",
                        "52.31419446-13.2146"
                    ]
                ],
                "manufacturer": "OpenWeather",
                "model": null,
                "name_by_user": null,
                "name": "OpenWeatherMap",
                "serial_number": null,
                "sw_version": null,
                "via_device_id": null
            }
        ],
        "entities": [
            {
                "entity_id": "sensor.klimaanlage_buro_outdoor",
                "state": "8.5",
                "attributes": {
                    "state_class": "measurement",
                    "unit_of_measurement": "°C",
                    "device_class": "temperature",
                    "friendly_name": "Temperatur"
                },
                "context": {
                    "id": "01HFQJHX59PKS8NP4KHK8EXNEH",
                    "parent_id": null,
                    "user_id": null
                },
                "last_changed": "2023-11-20T23:55:20.617Z",
                "last_updated": "2023-11-20T23:55:20.617Z"
            }
        ]
    }
]
**System Info (please complete the following information):** - VSCode - Chrome - v20.9 - 10.1

Cannot open when added to Home Screen

I have deployed the page to my Home assistant instance and I now have the URL for my dashboard.
I can access the URL from the browser normally.
But when I add it to the Home screen from Safari on iPhone, I get 403 Forbidden error rightaway, and nothing loads.
Is it something Home assistant related?

Update: tried adding the Home assistant normal URL to my home screen, it loads but everytime I close it, it asks credentials. So is it so when added to home screen, the browser engine is not able to maintain credentials. Is there some workaround with this library?

InteliSense stopped picking up generated types after upgrade from 1.0.12 to 13

Changing versions back and forth, .13 stops displaying completions for me, it works in .12. New version still errors when the invalid entity is passed, it's just the completion that stopped showing up. I'm working in PyCharm – basically WebStorm with Python support.
Tried invalidating caches, changing configuration, but it seems to be because of the library
Maybe you know something that might have caused it.

Add option to set and update attributes

Is your feature request related to a problem? Please describe.
I need a way to set and update attributes on some entities.

Describe the solution you'd like

  • setAttributes method set or to change just some of them, but because HA requires resending state with all attributes, it would pass the same state (ensuring it's the newest one first so it doesn't break), but can change attributes like setState by just passing its object, or to update them (also he newest data) by passing the function (oldAttributes) => newAttributes
  • adding same object/function attributes param (also as to setValue, setOption, etc – low priority if above is already implemented, but sometimes you want to update both state and attributes

Describe alternatives you've considered
Well, I can patch on something myself just good enough to achieve this, but that probably wouldn't be in line with the existing architecture/style/plans of the project.

Additional context
My HA is getting quite complex and some things make sense being bundled in the attributes.

Getting a lot of errors when following the contribution documentation

Cloning a fresh repo from master yields the following errors following the steps provided here: [email protected]:shannonhochkins/ha-component-kit.git

Exact repro steps:

  1. Clone repository
  2. npm install
  3. npm start
  4. Notice the following errors:
[vite] Internal server error: Failed to resolve entry for package "@hakit/core". The package may have incorrect main/module/exports specified in its package.json.
  Plugin: vite:import-analysis
  File: /home/yann510/github/test/ha-component-kit/packages/components/src/Shared/ColorPicker/index.tsx
      at packageEntryFailure (file:///home/yann510/github/test/ha-component-kit/node_modules/vite/dist/node/chunks/dep-df561101.js:28691:11)
      at resolvePackageEntry (file:///home/yann510/github/test/ha-component-kit/node_modules/vite/dist/node/chunks/dep-df561101.js:28688:5)
      at tryNodeResolve (file:///home/yann510/github/test/ha-component-kit/node_modules/vite/dist/node/chunks/dep-df561101.js:28419:20)
      at Context.resolveId (file:///home/yann510/github/test/ha-component-kit/node_modules/vite/dist/node/chunks/dep-df561101.js:28180:28)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async Object.resolveId (file:///home/yann510/github/test/ha-component-kit/node_modules/vite/dist/node/chunks/dep-df561101.js:44207:32)
      at async TransformContext.resolve (file:///home/yann510/github/test/ha-component-kit/node_modules/vite/dist/node/chunks/dep-df561101.js:43923:23)
      at async normalizeUrl (file:///home/yann510/github/test/ha-component-kit/node_modules/vite/dist/node/chunks/dep-df561101.js:41793:34)
      at async file:///home/yann510/github/test/ha-component-kit/node_modules/vite/dist/node/chunks/dep-df561101.js:41945:47
      at async Promise.all (index 7)
      at async TransformContext.transform (file:///home/yann510/github/test/ha-component-kit/node_modules/vite/dist/node/chunks/dep-df561101.js:41870:13)
      at async Object.transform (file:///home/yann510/github/test/ha-component-kit/node_modules/vite/dist/node/chunks/dep-df561101.js:44283:30)
      at async loadAndTransform (file:///home/yann510/github/test/ha-component-kit/node_modules/vite/dist/node/chunks/dep-df561101.js:54950:29)
      at async viteTransformMiddleware (file:///home/yann510/github/test/ha-component-kit/node_modules/vite/dist/node/chunks/dep-df561101.js:64345:32)

Extend entity types generator to include attributes too

Right now, entity names are typed, but their mapping to domains doesn't include attributes that vary between integrations.
Because of that, attributes lack completion and validation.
If it was possible to pull the services from HA, can the same be done for attributes?
2023-08-25 at 17 23 40@2x

Adding order number for AreaCards in SidebarCard

Is your feature request related to a problem? Please describe.
At this point Areas are added to SideBarCard in reverse order of how they are defined in the source code. However at the same time, they are getting placed in direct order in the main placeholder. It's reproducible if I follow the example from the docs:

https://shannonhochkins.github.io/ha-component-kit/?path=/docs/components-cards-sidebarcard--docs

Describe the solution you'd like
Use the same order in both places or adding a priority or order number to arrange them in SidebarCard

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts"

Describe the bug
Running the "npm run build && npm run deploy" get to run "npx ts-node --esm ./sync-types.ts" and errors:

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /Users/dylanmcleod/Library/CloudStorage/Dropbox/Jellyfin/Custom Dashboards/test-build/sync-types.ts
at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:160:9)
at defaultGetFormat (node:internal/modules/esm/get_format:203:36)
at defaultLoad (node:internal/modules/esm/load:143:22)
at async nextLoad (node:internal/modules/esm/hooks:750:22)
at async nextLoad (node:internal/modules/esm/hooks:750:22)
at async Hooks.load (node:internal/modules/esm/hooks:383:20)
at async handleMessage (node:internal/modules/esm/worker:199:18) {
code: 'ERR_UNKNOWN_FILE_EXTENSION'
}

To Reproduce
Steps to reproduce the behavior:

  1. new project using "npm create hakit@latest"
  2. cd'd into directory and ran "npm install"
  3. ran dev server to confirm it's working "npm run dev"
  4. ran "npm run build && npm run deploy"

Screenshots / code examples
Screenshot 2024-02-15 at 9 26 35 PM

System Info (please complete the following information):

  • IDE: Visual Studio Code: 1.86.2
  • Browser: chrome
  • npm version 10.2.4
  • node version 21.6.1

Additional context
After researching(Googling) and trying so many different things, I finally found this github issue(jumping to resolution): TypeStrong/ts-node#1997 (comment)

It indicated on node 20 and ESM ts-node-esm doesn't work, there were a few alts but i went with installing tsim and changing the sync in the package.json from default: "sync": "npx ts-node --esm ./sync-types.ts", to this: "sync": "TSIMP_DIAG=error node --import=tsimp/import ./sync-types.ts",
it builds but still fails (TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" ... scripts/deploy.ts ) on running the deploy command "npx ts-node --esm scripts/deploy.ts"
if I update deploy in package.json to: "deploy": "TSIMP_DIAG=error node --import=tsimp/import scripts/deploy.ts"
it just errors with "Error:" this wasn't a big issue as i just manually added the dist folder files to Home Assistant.

Hope all this helps

Display the settings modal

First, thanks a lot for this amazing project. It's rocks ! 🙌

Is your feature request related to a problem? Please describe.
Nop

Describe the solution you'd like
As on the lovelace ui, i'd like to display the settings form for an entity to edit those settings.

image

Do you think it's possible ? :)

Problem using the dashboard in companion app

Describe the bug
When using the HAKIT addon to add my dashboard to the sidebar, I get Invalid redirect URI as an error message when I try to visit it in the companion app . This when accessing the local instance.

When I visit the cloud instance through Nabu Casa, the dashboard loading animation spins up, but it never renders the dashboard.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy your dashboard to Home Assistant.
  2. Install the HAKIT addon and enable a link to the dashboard in the sidebar.
  3. Open the companion app on local wifi and get the error message.
  4. Turn wifi off on your phone and see the infinite loading spinner (at least when running on Nabu Casa).

Additional context
I'm thinking this might be a problem with the lack of a local SSL certificate in my case. Since I run Nabu Casa when being out of the house, I haven't bothered adding a local SSL certificate.

I'm thinking maybe the allowNonSecure param might be doing something fishy perhaps, when it's loaded over SSL in the companion app? Although then it should work when running it on the local network I guess.

A bit puzzled here, not sure if this is the best approach to add the dashboard to HA? Is the addon still the suggested approach? I was thinking maybe I could create a custom panel for it otherwise, but haven't explored it yet

useEntity not working for light entities that are turned off

Describe the bug
When a light entity is turned off, it cannot read a value from hs_color because it's null. I believe this started happening after upgrading to Home Assistant OS 2023.11.0.
When the light entity is turned it, it works as expected.

To Reproduce
Steps to reproduce the behavior:

  1. Install Home Assistant OS 2023.11.0
  2. Use useEntity('light.living_room_group') or <ButtonCard entity='light.living_room_group' />
  3. See error "Cannot read properties of null (reading '0')"

Expected behavior
I expect the ButtonCard to display the light entity in the "off" state without giving an error.

Screenshots / code examples
image
image

System Info (please complete the following information):

  • Home Assistant OS 2023.11.0 and higher

Additional context
The error seems to be happening in colors.ts and might be fixed by using a fallback value.

Allow numeric value for media_content_id

Is your feature request related to a problem? Please describe.
media_player.play_media only accepts a string value for media_content_id. Some smart TV integrations allow channel selection by integer value. This is supported by home assistant.

Describe the solution you'd like
It would be nice if the type was string|number, and I hope this isn't too onerous

Describe alternatives you've considered
I'm not sure of any alternative solutions

Additional context
I'm trying to create a tv remote component with an integrated program guide. So far in testing, only an LG webOS tv has worked with string channel values.

It works fine using useStore().connection.sendMessage, so not a huge priority.

Card for Calendar entries

Can we have a card to show future events from a Calendar(Google) entity or if there is already some card that can be used for similar purposes.

Pull from HA and codgen types for all entities

Right now, entity names have to be passed manually. It works fine as long as you check the part you change, but those entities will change in HA over time, and the dashboard code will too.

I see the following problems that can arise out of this:

  • we won't be notified when referencing an entity that has changed in HA
  • just lacking the simple convenience of not having to look up entity names and double-check for typos
  • no guarantee of the entity domains types being up-to-date (for example, I got the error with the calendar domain, and those domains list can change over time
  • the same problems with entity attributes, which can get quite complex

I think the following would address those issues:

  • pull all entity names from HA
  • generate type with all of the names
  • add a script that polls and updates them continuously (every 1s, configurable, for example)
  • additional improvement (can be done later as it's way more complex) – do the same with attributes, codegen type for each entity and then use them in conditional type based on the string provided to the useEntity

DevContainer

Issue for tracking discussion and testing of dev containers.

Proposed goal:

  • provide dev container
  • DevContainer includes home assistant demo instance
  • no additional setup needed inside the container

Setup CLI issues

Describe the bug

  1. useHass must be used within a HassProvider, have you wrapped your application in <HassConnect hassUrl={HASS_URL} />?
  2. There is no deploy script in package.json

To Reproduce
Steps to reproduce the behaviour of bug number 1:

  1. npm create hakit@latest
  2. Ensure your token and home-assistant URLs are valid in the .env file
  3. npm i
  4. npm run dev
  5. Notice the first error mentioned

Steps to reproduce the behaviour of bug number 1:

  1. npm create hakit@latest
  2. npm i
  3. npm run publish
  4. Notice the first error Missing script: "deploy"

Expected behavior
After running the creation CLI, I should have a working project ready to go :)

System Info (please complete the following information):

  • IDE: Webstorm
  • Browser: chrome
  • npm version: 9
  • node version: 18

Page fails to render without error

If I add any delay to the rendering the HassConnect it fails to render at all.

My guess is there's a onload listener or similar used to check the localstorage after which you redirect to the auth page?

I've got some scripts running to set the auth token but this causes a delay hence the issue.

To work around it I've refreshed the page after a slight delay and it seems happy but it's obviously not ideal.

Cheers!

Entity icon only updates when refreshing the page

First of all, thank you so much for creating and maintaining this, I love it and it's amazing how easy you made it to use! 🤩

Describe the bug
I've noticed that the Entity's Icon inside entity.attributes.icon doesn't get updated based on the state of the entity until I refresh the page, although everything else gets updated correctly automatically from the webhook (i.e. state changes from off to on but the icon remains "mdi:motion-sensor-off").
I tried to find an issue in my code but I tried the useEntity() hook in a plain component and log the returned entity.

To Reproduce
Steps to reproduce the behavior:

  1. In any component use the useEntity() hook and console log the returned entity
  2. Trigger the state change
  3. Check the new logs after the state change, and notice the new state value but in attributes.icon the icon remains unchanged
  4. Refresh the page and now you should see the new icon based on the new state

Expected behavior
The icon should update without the need to refresh the page

Screenshots / code examples
My example below is with a motion binary_sensor but the same result happens with contact sensors.

Screenshot 2024-02-14 at 22 39 24

System Info (please complete the following information):

  • Visual Studio Code
  • Chrome/Arc
  • npm version 9.6.3
  • node version 18.13.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.