GithubHelp home page GithubHelp logo

Comments (18)

toughvj avatar toughvj commented on July 29, 2024

challenge accepted

from homeassistant-greeclimatecomponent.

red3 avatar red3 commented on July 29, 2024

hey @toughvj , just add some details here:
I've started looking into the javascript files within the Gree+ app and found a few methods might helpful, comments are added by me by analyzing the contexts, so they can be inaccurate):

setLig:function(t) {
    var e=0,n=0;
    switch(t.value){
      case 0:
        e=0,n=1;break; // off
      case 1:
        e=1,n=1;break; // on
      case 2:
        e=1,n=0;break; // auto
      default:break
    }
    this.setState(["ableSend",!0]),
    this.sendData({Lig:e,LigSen:n})
}

LigStatus:function(){
    return console.log("LigStatus=======",[0,0,2,1][2*this.Lig+this.LigSen]),
    [0,0,2,1][2*this.Lig+this.LigSen]
    // 3 for on;
    // 2 for off;
    // 1 for auto
}

seed like we need an input_selector to represent the light status or maybe just another input_bool to represent built-in auto light on/off

from homeassistant-greeclimatecomponent.

toughvj avatar toughvj commented on July 29, 2024

We should replace light input boolean and auto_light with input_selctor with options:

  • on
  • off
  • auto
  • light sensor based

I need some time to take a look at this

from homeassistant-greeclimatecomponent.

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.