-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
useAreas not reporting moved entities correctly #105
Comments
Hey man! Thankyou for reporting the issue - I believe this is something I've introdcued as a feature for myself, but it's having unforseen side effects clearly - i've just released a new version of the core/components. As for the hook Hopefully this works for you! |
hey, it's not working as i expect, but i checked your commit and i think i can create a pr later. maybe after work :) koriwi@MacBook-Pro-von-Kilian ha-dashboard % npm run dev
> ha-dashboard@0.0.0 dev
> vite
VITE v5.0.0 ready in 146 ms
➜ Local: http://localhost:5173/local/ha-dashboard/
➜ Network: use --host to expose
➜ press h + enter to show help
✘ [ERROR] Could not resolve "@iconify/react"
node_modules/@hakit/components/dist/hakit-components.es.js:16:27:
16 │ import { Icon as dI } from "@iconify/react";
╵ ~~~~~~~~~~~~~~~~
You can mark the path "@iconify/react" as external to exclude it from the bundle, which will
remove this error and leave the unresolved path in the bundle. |
Hey man, thanks that'd be great, unless we jump on a call to chat about the issue more because I might be misunderstanding the root issue! Usually, this is because the project was built in different node / npm versions, I normally blow away build and package directories, and re-install and rebuild and re-link the workspace to rule out everything else If all else fails, install the package manually on both sides, but I doubt that'll work I will try checkout a new clone tomorrow and I'll see if I can replicate (it's 1030pm here now) |
ahhh ok. im more or less utc :) so you are utc +10? sounds like a cunt to me 😜 |
Haha easy as mate |
Ok. i couldnt figure out until now how to npm link a package of a monorepo with peer dependencies in vite... |
Yo, I can jump on a call in 45, but can you check your node and npm version please? It's looks to me like incorrect versions or mismatch versions, both in ha-component-kit and your dashboard must be using the same node version and npm version, and the npm version should be > 7 |
i did. but i will check again :) |
I Just had a quick look tthrough the home assistant repository, they have this "memberships" method which looks pretty similar to what the useAreas hook is supposed to achieve Might be worth taking a look at this to determine if it has the same logic you're expecting to see! |
there it is |
After I've merged your PR, I tested it, and noticed what i was missing in my example
And to achieve that, i'd need to lookup the device rather than a simple check either way so what you proposed (as you expected) is correct - sorry it just took me a while to replicate the issue :) |
No worries! Also sorry for responding so late. My sister is moving and I'm helping. So I'm a bit more busy than usual |
I'm re-opening this as I've just noticed that for myself, It doesn't appear to be working correctly - I noticed that when i displayed the counts for devices & entities, I'm getting some really obscure results. For all of my areas, the "deviceEntities" more or less end up with basically every available device from my instance. Are you seeing the same results? |
After reading the code - it seems maybe you and I were confused with each other, but the current logic where it pushes items to the |
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:
const areas = useAreas();
Expected behavior
The moved entity should only show up in its area and not the area of its parent device
Screenshots / code examples
![Screenshot 2023-11-21 at 00 55 19](https://private-user-images.githubusercontent.com/6781497/284421221-0f12ea1f-f3d0-4dd9-bfba-2e4d41248d1e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE3NTAzMTUsIm5iZiI6MTcyMTc1MDAxNSwicGF0aCI6Ii82NzgxNDk3LzI4NDQyMTIyMS0wZjEyZWExZi1mM2QwLTRkZDktYmZiYS0yZTRkNDEyNDhkMWUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcyMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MjNUMTU1MzM1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ODU0NTAzODE2ZTNlZjQ3NWE4OTgwZDhjMTQ5OTdhNjU5MjM5ZThmYTRlYjgzYzkxNzI1NTBlM2JhNjU4MGUyNiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.a0dFeYgAjl7nu2H-gJjXBkE9YQEiC9IJzrHS6Hr2Brs)
This screenshot should illustrate the device <-> entity difference when it comes to areas
ctrl+f for `sensor.klimaanlage_buro_outdoor` in this json
The text was updated successfully, but these errors were encountered: