Giter VIP home page Giter VIP logo

Comments (7)

asantaga avatar asantaga commented on June 22, 2024

from wiserhomeassistantplatform.

asantaga avatar asantaga commented on June 22, 2024

Hey v966732

Done a lot here.

Ive added PCT_Demand to each room as a custom attribute AND at the heating state level. I noticed that he heating state is an array (because drayton sell it with 1-2-3 channels) so Ive modified this accordingly..

Please test and let me know.

easiest way to test is to simply clone the entire branch into your custom_components directory (I changed a number of files) and then move all the python files into the right locations...

Let me know if it all works and I'll merge it to master (probably up the version to 1.2)

from wiserhomeassistantplatform.

v966732 avatar v966732 commented on June 22, 2024

Hi,

Thank-you for all your work on this.

I downloaded the new code and tested it, the percentage demand worked straight away but current temperature and target/set temperature both disappeared from the climate component. I fiddled about with it and if I added target_temperature and current_temperature into the # Generic attributes section then I could read the values again. I'm not sure why this would be the case given that this is a climate component.

The amended Generic attributes section is as follows:-

#13

@property
def state_attributes(self):
    # Generic attributes
    attrs={}
    attrs['percentage_demand'] = self.handler.getHubData().getRoom(self.roomId).get("PercentageDemand")
    attrs['heating_rate'] = self.handler.getHubData().getRoom(self.roomId).get("HeatingRate")
    attrs['window_state'] = self.handler.getHubData().getRoom(self.roomId).get("WindowState")
    attrs['window_detection_active']= self.handler.getHubData().getRoom(self.roomId).get("WindowDetectionActive")
    attrs['away_mode_supressed']= self.handler.getHubData().getRoom(self.roomId).get("AwayModeSuppressed")
    attrs['target_temperature']= self.handler.getHubData().getRoom(self.roomId).get("CurrentSetPoint")/10
    attrs['current_temperature']= self.handler.getHubData().getRoom(self.roomId).get("CalculatedTemperature")/10




    return attrs 

Cheers

from wiserhomeassistantplatform.

asantaga avatar asantaga commented on June 22, 2024

tis a bit strange.. but I'll make the changes anyway..

I still have to create the ability to "set" temperatures, I'll do that at the same time (if I finish my accounts tonight)

whilst Im at it, are there any other values which would be of use?

from wiserhomeassistantplatform.

asantaga avatar asantaga commented on June 22, 2024

sorted, it was because i wasnt calling super and not executing the base code. fixed now
also pushed this to master as v1,2

from wiserhomeassistantplatform.

v966732 avatar v966732 commented on June 22, 2024

I've downloaded 1.2 and it all works fine, thank-you

from wiserhomeassistantplatform.

asantaga avatar asantaga commented on June 22, 2024

excellent :-) , gotta admit I was baffled by this , even adding your code didnt really do the trick so I investigated more.. Then lightbulb moment, by trade Im a java developer and when subclassing you always call the super.. so when I investigated that I realised this is precisely what I needed to do :-) So for me this bug helped me in many ways

Awesome stats too!!!

from wiserhomeassistantplatform.

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.