Giter Site home page Giter Site logo

warzone's Introduction

Warzone Integration

GitHub Release License hacs

This is a warzone integration for home assistant

This integration exposes a sensor for the current battle royal data from warzone.

This component will set up the following platforms.

Platform Description
sensor Show warzone battle royal stats.

Sensors

Sensor Description
sensor.warzone_cash Cash
sensor.warzone_contracts Contracts
sensor.warzone_deaths Deaths
sensor.warzone_downs Downs
sensor.warzone_gamesplayed Games Played
sensor.warzone_kdratio Kill Death Ratio
sensor.warzone_kills Kills
sensor.warzone_level Current Season Level
sensor.warzone_revives Revives
sensor.warzone_score Score
sensor.warzone_scoreperminute Score Per Minute
sensor.warzone_timeplayed Time Played
sensor.warzone_tokens Tokens
sensor.warzone_topfive Top 5
sensor.warzone_topten Top 10
sensor.warzone_toptwentyfive Top 25
sensor.warzone_wins Wins

Installation

  • Go to "Configuration" -> "Integrations" click "+" and search for "Warzone".

Configuration

Please note the Username and password used to login does not have to be your main account. You can create a new account to access the api but then you have to either set the profile you want to track to public or add the user you are logging in from as a friend.

Libraries

Thanks to https://github.com/EthanC/CallofDuty.py

Using this in lib because of python version mismatch. When home assistant runs on python 3.9 by default we can use this like normal.

warzone's People

Contributors

jacokok avatar

Stargazers

 avatar

Watchers

 avatar  avatar

warzone's Issues

Sensor names

I just found this integration and it seems like a great idea! Now I can easily track how far I am behind the rest of my squad, haha.

Some ideas for improvements.

  • The sensor names are difficult to know which user they belong to.
  • Instead of having to setup the integration multiple times for each account to track, maybe it could just automatically add all friends that appear on callofduty.com

image

The Xbox integration names the sensors like Gamertag Sensor Name for the friendly name and the entity name would be sensor.gamertag_sensor_name. Perhaps this integration could use the same logic?

RuntimeError: Cannot reopen a client instance, once it has been closed.

Thanks for your work on this integration!

When trying to add the integration, I'm getting the following error. I'm running 2021.9.7 with 1.0.4 of this integration

2021-09-27 19:03:32 ERROR (MainThread) [custom_components.warzone.config_flow] Unexpected exception Traceback (most recent call last): File "/config/custom_components/warzone/config_flow.py", line 76, in async_step_user info = await validate_input(self.hass, user_input) File "/config/custom_components/warzone/config_flow.py", line 50, in validate_input if not await wz.authenticate(): File "/config/custom_components/warzone/config_flow.py", line 39, in authenticate client = await Login(self.username, self.password) File "/config/custom_components/warzone/lib/auth.py", line 133, in Login await auth.SubmitLogin() File "/config/custom_components/warzone/lib/auth.py", line 103, in SubmitLogin async with self.session as client: File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1955, in __aenter__ raise RuntimeError(msg) RuntimeError: Cannot reopen a client instance, once it has been closed.

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.