Giter VIP home page Giter VIP logo

Comments (3)

DaveTBlake avatar DaveTBlake commented on September 21, 2024

Yes facing the same issue here, "default_real_mode" produces error. Would like advice on getting mode.

from teslapy.

DaveTBlake avatar DaveTBlake commented on September 21, 2024

While get_battery_data() no longer retrieves "default_real_mode" or "operation" (that always seemed to be the same as "default_real_mode"), I have found from experimenting that getting data from the endpoint api/1/energy_sites/{site_id}/site_info does return "default_real_mode". I don't know if this is new, or if it has always done so as this is not an endpoint I have used.

To access that I added the following method to the Battery class in init.py

def get_site_info(self):
        """ Retrieve current site config information"""
        self.update(self.api('SITE_CONFIG')['response'])
        return self

Powerwall mode is then given by product.get_site_info()["default_real_mode"]

from teslapy.

HeraldCoupe avatar HeraldCoupe commented on September 21, 2024

def get_site_info(self):
""" Retrieve current site config information"""
self.update(self.api('SITE_CONFIG')['response'])
return self

Thanks for this. After some fidding around I got it to work.

from teslapy.

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.