Hey everyone, I wanted to share my recent experience integrating my Nintendo Switch with Home Assistant. It’s been a fun project that combines gaming and smart home automation! ![]()
![]()
I’ve always loved tracking my gaming habits, especially for games like Ring Fit Adventure. Unfortunately, the Nintendo Switch doesn’t have built-in integrations for this, so I decided to get creative. I used a piece of homebrew software on my Switch to track my gaming sessions and sync the data with Home Assistant. Here’s how I did it:
- Homebrew Setup: I installed a sysmodule called SwitchPresence-Rewritten on my Switch. This allows me to send game data to Home Assistant.
- Scripting: I wrote a small Python script to parse the game data and update a sensor in Home Assistant. The script checks the Switch’s IP address and extracts the current game being played.
- Automation: I set up a sensor in Home Assistant to track how long I play Ring Fit Adventure. It uses the
history_statsplatform to calculate the duration since the start of the day.
Here’s a quick look at the setup:
yaml
sensor:
- platform: command_line
name: Switch App
command: python3 /config/scripts/presence-client.py - platform: history_stats
name: Ring Fit Duration
entity_id: sensor.switch_app
state: “Ring Fit Adventure”
type: time
start: “{{ now().replace(hour=0, minute=0, second=0) }}”
end: “{{ now() }}”
The result is a neat integration where I can see my gaming stats right alongside my smart home devices!
It’s been a great way to stay motivated with my fitness goals while also diving into some DIY smart home projects.
If anyone has similar projects or tips for tracking other devices, I’d love to hear about them! Let’s keep the creativity flowing! ![]()