Comments (6)
So far, I've been able to retrieve and generate types for the following Domains:
AlarmControlPanelEntity
AutomationEntity
CameraEntity
ClimateEntity
CoverEntity
FanEntity
GroupEntity
HumidifierEntity
ImageEntity
InputSelectEntity
LawnMowerEntity
LightEntity
LockEntity
MediaPlayerEntity
RemoteEntity
SceneEntity
ScriptEntity
SelectEntity
TextEntity
TimerEntity
UpdateEntity
VacuumEntity
WaterHeaterEntity
WeatherEntity
I still have a bit of testing to do, just providing you with an update, this means that whenever you use an entity, if it be from the useEntity hook, you'll receive the types from these entities rather than the generic HassEntityBase
For everything else as mentioned i'll provide a way to extend it but that's the best i can do!
from ha-component-kit.
I will close this one, if you have any further issues please open another ticket :)
from ha-component-kit.
Yep! I have tried this before, home assistant doesn't provide certain attributes in certain states, ie if you have colortemp set on a light, the hscolor attribute isn't provided on the entity, so it's completely possible that the types could be missing properties but I'll do some digging
from ha-component-kit.
I have something in the works for the entity attributes, probably 80% there, however there's still a lot that even in home assistant, isnt typed, the calandar entities is one of them that isn't typed in the home assistant repository either
I will be providing a simple way to extend DomainEntities manually if need be as I can't predict all types from all domains as there's far too many of them, however the types I am generating are identical to home assistant dashboard and can be synced every time i publish
from ha-component-kit.
Just released new versions of the package, including documentation on how to extend your own (at the bottom of this page)
PR - here's the PR for reference
Let me know how you go!
from ha-component-kit.
I do have another idea on how to handle the types from entities that aren't typed in the home assistant repository, I will play around with it but at least for now you have the option to add your own types 😉
from ha-component-kit.
Related Issues (20)
- Entity icon only updates when refreshing the page HOT 5
- TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" HOT 17
- Problem using the dashboard in companion app HOT 28
- Modal - Animation Control HOT 1
- Discord link is expired HOT 1
- Vacuum Card - New card to control Vacuum entities HOT 1
- Prevent sidebar/group collapsing HOT 5
- POC - Swap store to signals HOT 1
- Multi lingal HOT 1
- Option to disable animations HOT 5
- Authorization request after each page refresh HOT 7
- access to HA without logging in (use token) HOT 4
- AlarmCard
- Card title and description HOT 3
- useDevice hook HOT 6
- Style rgb variables for error/warning/success HOT 4
- Deploy docs update: SSH add-on HOT 3
- Theme provider flashes HOT 1
- ThemeProvider - precompile and make more dynamic
- useTemplate
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ha-component-kit.