Component to integrate with fortnite.
This 'fortnite' component is a Home Assistant custom sensor which shows you various stats accumulated while playing the very popular F2P game, Fortnite: Battle Royale.
It can show you how well you're playing the game with stats like:
And how many times you finish in the:
This is my first Home-Assistant Custom Component, so it's been a fun learning experience for me contributing to Open Source Software! This wouldn't been possible without the help from @xcodinas for building the fortnite-python library and from @clyra for helping refine my initial script and idea by further developing it towards a more finished product. From there I've added some extra tweaks, wrote the documentation, and published it in the Home-Assistant Community Store (HACS).
This component will set up the following platforms.
Platform | Description |
---|---|
sensor |
Show stats pulled from fortnite API on https://fortnitetracker.com |
Download the fortnite.zip file from the latest release. Unpack the release and copy the custom_components/fortnite directory into the custom_components directory of your Home Assistant installation. Configure the fortnite sensor. Restart Home Assistant.
Ensure that HACS is installed.
Search for and install the "fortnite" integration.
Configure the fortnite sensor in configuration.yaml
.
Restart Home Assistant.
configuration.yaml
My username is Captain_Crunch88 and I play on the Nintendo Switch (use "GAMEPAD" in the config) if you want to test out the sensor. You'll need to register for an api key at https://fortnitetracker.com/site-api
sensor:
- platform: fortnite
name: Fortnite Solo Stats
api_key: 12345678-90ab-cdef-ghij-lmnopqrstuvw
player_id: Captain_Crunch88
game_platform: "GAMEPAD"
game_mode: "SOLO"
- platform: fortnite
name: Fortnite Duo Stats
api_key: 12345678-90ab-cdef-ghij-lmnopqrstuvw
player_id: Captain_Crunch88
game_platform: "GAMEPAD"
game_mode: "DUO"
- platform: fortnite
name: Fortnite Squads Stats
api_key: 12345678-90ab-cdef-ghij-lmnopqrstuvw
player_id: Captain_Crunch88
game_platform: "GAMEPAD"
game_mode: "SQUAD"
If you play on multiple platforms, you'll need to create multiple sensors for each platform you play on. For example if you play on the PC and Nintndo Switch, you'd use PC
in one sensor and GAMEPAD
in the other sensor. At this time there is no aggregate sensor, but maybe you can submit a pull request for a Template Sensor in Home Assistant to aggregate it!
Game Platform | Config Value (ALL CAPS!) |
---|---|
PC | PC |
Xbox | XBOX |
PlayStation | PSN |
iPad & iPhone | TOUCH |
Nintendo Switch | GAMEPAD |
KBM | KBM |
If you want to contribute to this please read the Contribution guidelines