Tour de France Automation Magic: Connecting Zwift, Home Assistant, and Smart Lighting

When the Tour de France begins each summer, it turns everyday TV viewing into a months-long celebration of endurance, strategy, and pure suffering (for the riders at least). But if you’re already using Zwift for indoor cycling and Home Assistant for smart home control, you can take the experience far beyond passive watching.

Advertisements

By combining real-time cycling data, smart lighting, and event-based automations, you can turn your home into a dynamic “race environment” that reacts to both the Tour de France and your own Zwift training sessions.

This post explains how to build a Tour de France-inspired smart home setup using Home Assistant, Zwift data, and automated lighting scenes. It includes real-world use cases and a working YAML automation example you can adapt.


System Overview: What You Need

To build a Tour de France automation setup, we combine three main components:

1. Home Assistant

Home Assistant acts as the central automation engine. It connects devices, reads sensors, runs automations, and controls scenes.

Typical integrations used here:

  • Smart lighting (Hue, IKEA Tradfri, Zigbee, Z-Wave)
  • Media players (Chromecast, Apple TV)
  • Calendar integration (for Tour de France stages)
  • Weather and time-based triggers

2. Zwift Integration / Data Source

Zwift provides indoor cycling metrics such as:

  • Power output (watts)
  • Speed
  • Heart rate (via sensors)
  • Cadence (RPM)
  • Elevation / gradient (via virtual course data)

These values can be imported into Home Assistant using:

  • MQTT bridge
  • Third-party Zwift integrations
  • Fitness platforms like Strava (indirect sync)

Even if you only get power and speed, that’s enough for meaningful automations.


3. Smart Lighting System

This is where the “magic” happens visually.

Supported systems:

  • Philips Hue
  • IKEA Trådfri
  • Zigbee2MQTT
  • Shelly dimmers

We use lighting for:

  • Race atmosphere
  • Sprint simulation
  • Climbing intensity effects
  • Stage start/end transitions

Concept: Turning Cycling Into a Living Race

The idea is simple: your home reacts like a cycling broadcast.

Instead of static lighting and passive viewing, your environment changes dynamically based on:

  • Tour de France stage schedule
  • Zwift training intensity
  • “Race moments” like sprint or climb phases

You effectively create a hybrid experience:
real-world event + virtual training + smart home feedback loop

Advertisements

Use Case 1: Tour de France Stage Mode

Each stage of the Tour de France typically starts between 12:00 and 13:00 CET. Using a calendar integration in Home Assistant, we can trigger a full “Race Mode” scene.

What happens in Race Mode:

  • Warm yellow lighting to simulate French summer sun
  • Soft pulsing light transitions to mimic broadcast energy
  • TV automatically turns on or switches to cycling channel
  • Notification: “Stage has started – welcome to the breakaway!”

You can also adjust indoor temperature settings slightly for immersion (e.g., 21–23°C to simulate warm summer conditions).


Use Case 2: Zwift Ride = Virtual Peloton Experience

When you start a Zwift session, Home Assistant can automatically shift your home into “training mode”.

Example reactions:

  • Blue-white lighting to simulate cool training focus
  • Ambient lighting intensity increases with power output
  • Fan speed increases based on wattage or heart rate
  • Music or cycling commentary starts playing

This creates a strong psychological link between effort and environment.


Use Case 3: Climbing vs Sprint Lighting Effects

One of the most engaging automations is mapping cycling intensity to lighting.

Suggested mapping:

  • 0–100 watts → calm white light (warm-up)
  • 100–200 watts → soft green lighting (steady ride)
  • 200–300 watts → yellow lighting (tempo effort)
  • 300+ watts → red lighting (sprint or climb effort)

If you have gradient data from Zwift:

  • 0–3% incline → green scene (flat stage)
  • 3–7% incline → yellow (rolling terrain)
  • 7%+ incline → red + warmer white tones (mountain stage)

This turns your pain cave into a virtual Alpine climb simulator.


Use Case 4: Final Kilometers “Race Finish Mode”

During Tour de France broadcasts, the final kilometers are where everything happens.

You can simulate this using a timer or estimated stage duration.

Final 10 km effects:

  • Gradual increase in lighting intensity
  • Pulsing red/white “race tension” effect
  • TV volume increase
  • Optional notification: “Final sprint approaching!”

If Zwift is active at the same time, you can synchronize your own sprint effort with the race finish.


YAML Automation Example

Below is a simplified Home Assistant automation that triggers a Zwift “Sprint Mode” lighting scene when power exceeds a threshold.

alias: Zwift Sprint Mode Lighting
description: Change lights when Zwift power exceeds sprint threshold
mode: restart

trigger:
- platform: numeric_state
entity_id: sensor.zwift_power
above: 300
for:
seconds: 3

condition:
- condition: state
entity_id: binary_sensor.zwift_active
state: "on"

action:
- service: light.turn_on
target:
entity_id: light.living_room
data:
brightness_pct: 100
rgb_color: [255, 0, 0]

- service: notify.mobile_app
data:
message: "Sprint mode activated! Go all out!"

- delay: "00:00:10"

- service: light.turn_on
target:
entity_id: light.living_room
data:
brightness_pct: 60
rgb_color: [255, 255, 255]

How this works:

  • When Zwift power exceeds 300 watts for 3 seconds, sprint mode activates
  • Lights switch to red at full brightness
  • After 10 seconds, lighting returns to normal training mode

You can expand this with multiple zones, fan control, or even sound effects.


Advanced Ideas

Once the basics are in place, you can go much further:

1. Peloton Simulation Mode

If your power spikes above your average:

  • “You are in a breakaway!”
  • Lights turn green
  • After 20 seconds: “Peloton chasing…” with red flashing lights

2. Weather + Race Integration

If outdoor temperature is above 25°C:

  • Warmer lighting scenes
  • Reduced indoor fan automation intensity (for realism)

If rainy:

  • Cooler, dimmer “classic northern stage” lighting mood

3. Recovery Mode After Ride

When Zwift session ends:

  • Warm orange lighting
  • Reduce brightness gradually
  • Suggest hydration notification
  • Optionally trigger coffee machine or smart kettle

Why This Works So Well

This setup is effective because it connects physical effort with environmental feedback.

Instead of cycling in isolation, you get:

  • Immediate sensory reinforcement
  • Gamified training experience
  • Stronger motivation during hard efforts
  • A more immersive Tour de France viewing experience

It turns both watching and training into something closer to a live event.


Final Thoughts

The combination of Home Assistant, Zwift, and Tour de France timing creates a surprisingly powerful smart home experience. It blends entertainment, fitness, and automation into a single system that reacts to both real-world events and personal performance.

Even starting small—like a simple sprint lighting automation—can make indoor cycling more engaging. From there, you can scale into full “race simulation environments” that rival professional esports setups.


Some of the links in this article are "affiliate links", a link with a special tracking code. This means if you click on an affiliate link and purchase the item, we will receive an affiliate commission. The price of the item is the same whether it is an affiliate link or not. Regardless, we only recommend products or services we believe will add value to our readers. By using the affiliate links, you are helping support our Website, and we genuinely appreciate your support.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.