Skip to content
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

Add Device Card #92

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Add Device Card #92

wants to merge 3 commits into from

Conversation

AalianKhan
Copy link
Owner

@AalianKhan AalianKhan commented Nov 13, 2023

Add a device card.
when enabled via device options, creates a device card in the room for the particular device and the tap action creates a popup to show entities linked to that device.

TODO:

  • Find and add a main entity to secondary information and tap action. Found via entity_registry, entity.entity_catagory == state.
  • Add a manual option for the main entity via card_options.
  • Hide entities in the room page when the entities' parent device has deviceCard enabled.
  • Fix the bug to only show the device in the assigned area.

@AalianKhan
Copy link
Owner Author

@DigiLive I want to create a function to create all the domain cards since I need it for the device card again. I tried adding it in mushroom-strategy.js but I was getting errors about it not being defined when I try to call it. When you have time, can you take a look?

@DigiLive
Copy link
Collaborator

You've created createDomainCards as a method of class MushroomStrategy, so you call it as this.createDomainCards(), or if it's a static method as MushroomStrategy.createDomainCards().

I've attached an example of which you have to remove the .txt extension:
mushroom-strategy.js.txt

Also, PR #81 is a massive change of the code base which is impossible to merge with the main branch. Especially when other PR's change this branch a lot also.
I would appreciate it if you can wait for that PR to be reviewed and fully tested so it can be merged. After merging start implementing new features again.

@DigiLive
Copy link
Collaborator

btw... going to Browser Mod in the side bar, my console get spammed with manymanymany errors.
I think it's related to thomasloven/hass-browser_mod#652

@AalianKhan
Copy link
Owner Author

Thank you very much.
Sure I will wait for that PR.
Mine works okay, hopefully gets fixed soon

@DigiLive
Copy link
Collaborator

I guess the errors have something to do with localization. Still a heavy integration for just a popup, though. But we'll see.

Thanks for waiting on my PR. I hope you can test and review it soon. Your help might also be needed to merge/force push.

@DigiLive DigiLive added the enhancement New feature or request label Nov 22, 2023
@DigiLive
Copy link
Collaborator

Warning

The main branch has been switched to TypeScript.
Update your feature branch accordingly!

@DigiLive
Copy link
Collaborator

FYI... Maybe I've found a way to use just a part of browser mod.

If so, we can use it in this project directly without the user having to install browser mod.
And it's more lightweight.

@AalianKhan
Copy link
Owner Author

Oh nice,
Can you send me more details?

@DigiLive
Copy link
Collaborator

Oh nice,
Can you send me more details?

Yeah sure.
But I have to play and find out a little myself first. 😅
Once I get a short sample running, you'll get to know it.

@DigiLive
Copy link
Collaborator

DigiLive commented Dec 1, 2023

It takes a little longer.
I've decided to create a card for Home Assistant myself to fit the requirements for this PR.

It's still gonna be a card which we can use in the code directly. So no need to require another HACS repo to be installed.

@AalianKhan
Copy link
Owner Author

Whenever you finish with the popup, just shoot me a message.
Thanks

@DigiLive
Copy link
Collaborator

Whenever you finish with the popup, just shoot me a message. Thanks

Yeah...

I've been quite busy lately.
Planning to pick it up soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants