Giter Site home page Giter Site logo

Comments (6)

shannonhochkins avatar shannonhochkins commented on July 23, 2024 1

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.

shannonhochkins avatar shannonhochkins commented on July 23, 2024 1

I will close this one, if you have any further issues please open another ticket :)

from ha-component-kit.

shannonhochkins avatar shannonhochkins commented on July 23, 2024

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.

shannonhochkins avatar shannonhochkins commented on July 23, 2024

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.

shannonhochkins avatar shannonhochkins commented on July 23, 2024

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.

shannonhochkins avatar shannonhochkins commented on July 23, 2024

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)

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.