shannonhochkins/ha-component-kit

Can I query a list of area and entities within a area?

DesnLee opened this issue ยท 8 comments

I have several areas in Home Assistant, each containing some entities. Can I query a list of area and entities within a area?

I actually haven't had a look into this before, but leave it with me! I'll get back to you when I can mate

I actually haven't had a look into this before, but leave it with me! I'll get back to you when I can mate

No problem at all. Thanks, mate!

Just had a quick look, there's a websocket to subscribe to, I'll create a useAreas hook if that works for you?

That sounds like a good approach. Please go ahead and create the useAreas hook. Thanks for your help!

I will create this after the CalendarCard I'm working on which is near completion, should have it sorted within a week

Take your time with it, and if you need any assistance or testing, feel free to reach out. Thanks again!

@DesnLee - would you mind installing the latest versions of core/components and try out the new useAreas hook provided by @hakit/core when you can?

This should return you the exact same information you see when you navigate to the areas section in home assistant, the area's with name, picture and associated entities/devices/services

Let me know how you go!

Sure, I'll install the latest versions of core/components and test out the new useAreas hook from @hakit/core as soon as I can. I'll let you know how it goes and provide feedback. Thanks for keeping me in the loop!