Coder Social home page Coder Social logo

Comments (7)

julienld avatar julienld commented on June 11, 2024 1

Merci pour le release!

from hilo.

DBestman avatar DBestman commented on June 11, 2024

Tu as très bien décrit le même problème que j'ai observé, et je suis d'accord avec tes observations. Je t'encourage à le régler! 😁

from hilo.

valleedelisle avatar valleedelisle commented on June 11, 2024

Belle observation, je crois également que tu as raison après avoir lu la doc.

Je crois qu'on devrait mettre la logique dans python-hilo comme hvac_mode et tout simplement exposer hvac_mode dans l’intégration home assistant.

Si j'ai bien compris:

  • On remplacerait hvac_mode ici par hvac_action et on remplace heat par heating et off par idle, a moins qu'il soit offline.

https://github.com/dvd-dev/python-hilo/blob/main/pyhilo/device/climate.py#L31-L34

Malheureusement, Hilo ne semble pas supporté les calls de type set_hvac_mode (ex pour mettre a off), donc ici, ça reste pareille:

def set_hvac_mode(self, hvac_mode):
"""Set operation mode."""
return

Et tant qu'à travailler là dedans, il faudrait presque migrer vers les Enum car les constantes sont dépréciées.
https://github.com/home-assistant/core/blob/dev/homeassistant/components/climate/const.py#L8-L31

J'ai toujours pas environnement de dev et j'manque de temps pour deepdive tout ça, mais si vous soumettez des PR, je vais les reviews et merged.

from hilo.

julienld avatar julienld commented on June 11, 2024

Je vais essayer de faire une PR en fin de semaine, mais je ne garantis rien.

from hilo.

ic-dev21 avatar ic-dev21 commented on June 11, 2024

Belle observation, je crois également que tu as raison après avoir lu la doc.

Je crois qu'on devrait mettre la logique dans python-hilo comme hvac_mode et tout simplement exposer hvac_mode dans l’intégration home assistant.

Si j'ai bien compris:

  • On remplacerait hvac_mode ici par hvac_action et on remplace heat par heating et off par idle, a moins qu'il soit offline.

https://github.com/dvd-dev/python-hilo/blob/main/pyhilo/device/climate.py#L31-L34

Malheureusement, Hilo ne semble pas supporté les calls de type set_hvac_mode (ex pour mettre a off), donc ici, ça reste pareille:

def set_hvac_mode(self, hvac_mode):
"""Set operation mode."""
return

Et tant qu'à travailler là dedans, il faudrait presque migrer vers les Enum car les constantes sont dépréciées. https://github.com/home-assistant/core/blob/dev/homeassistant/components/climate/const.py#L8-L31

J'ai toujours pas environnement de dev et j'manque de temps pour deepdive tout ça, mais si vous soumettez des PR, je vais les reviews et merged.

Je comprends pas mal où tu t'en vas, le bout qui m'échappe c'est où pyhilo entre en ligne de compte? Il ne fait pas parti du custom component, est-il installé via core? Où se trouvent ces fichiers si je veux tenter l'expérience de mon bord?

from hilo.

julienld avatar julienld commented on June 11, 2024

J'ai fait les 2 pull requests... testé avec HA 2023.2.3.

dvd-dev/python-hilo#75
#220

from hilo.

valleedelisle avatar valleedelisle commented on June 11, 2024

Merci bien pour les commits et pour avoir tester. J'vais faire une release plus tard ce weekend!

from hilo.

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.