Skip to content

CityBikes & Home Assistant: The Ultimate 2026 Guide to Smart Urban Mobility

10/02/2026

Last updated on February 10, 2026

Smart urban mobility is a cornerstone of the modern smart home. Knowing in real-time if there’s a bike available near your apartment can completely transform your daily routine. Today, in this definitive 2026 guide, we’re diving deep into the CityBikes Home Assistant integration. This powerful tool lets you monitor bike and dock availability at your city’s stations, turning your dashboard into a command center for your daily commute.

What is the CityBikes Integration & Why You Need It

CityBikes is an API that aggregates data from hundreds of bike-sharing systems worldwide. The official Home Assistant integration hooks into this API to create specific Home Assistant sensors for the stations you care about. Each sensor provides key attributes like:

  • Available Bikes: The exact number of bikes ready for you to grab.
  • Free Docks: The number of empty slots to return a bike.
  • Station Name: To easily identify it.
  • Last Updated: To know how fresh the data is.

With this information, the bike-share integration becomes an incredibly powerful tool for home automation, allowing you to make smarter decisions before you even step out the door.

Setting Up CityBikes in Home Assistant (The 2026 UI Method)

Gone are the days when editing YAML files was the only way to get this done. For a while now, Home Assistant has made the process incredibly simple. The UI-based setup is now the recommended and easiest method.

  1. Navigate to Settings > Devices & Services.
  2. Click the Add Integration button in the bottom right corner.
  3. Search for “CityBikes” and select it.
  4. A dialog box will pop up to configure your first bike network.

In this dialog, you’ll need to fill in the following fields:

  • Name: A friendly name for this group of sensors (e.g., “Home Bikes”).
  • Network: The ID for your city’s network. You can find yours in the official CityBikes network list. For example, citibike-nyc for New York City or bay-wheels for the Bay Area.
  • Location: By default, it will use your Home Assistant instance’s location. You can specify a different latitude and longitude if you want to monitor stations in another area (e.g., near your office).
  • Radius: The radius in meters from your location to search for stations. A value of 500 (about 1640 ft) is usually a good starting point.

And that’s it! Home Assistant will automatically discover all stations within that radius and create the corresponding sensors.

Advanced Setup: The YAML Method (For Power Users)

While the UI method is the new standard, YAML configuration is still a powerful and valid option for those who manage their configurations as code or need more complex setups. To do this, you’ll need to add the following block to your configuration.yaml file or, if you’ve split it out, to sensors.yaml.

Here’s a breakdown of the parameters, which mirror the UI options but are defined manually:

ParameterDescription
platformMust be citybikes. This is the integration’s identifier.
nameA base name used as a prefix for the entities. Example: WorkBikes.
networkThe ID of the bike network you want to query. Required if specific stations are not defined.
latitude / longitudeCoordinates for the center of your search area. Defaults to your Home Assistant location.
radiusSearch radius in meters. Super useful for limiting sensors to only those relevant to you.
stationsA list of specific station IDs to monitor, ignoring the radius. Perfect if you only care about a couple of specific stops.

Here is a practical example to monitor the Bay Wheels network within a 500-meter radius of the default Home Assistant location, but only for two specific stations.

# Example in sensors.yaml or configuration.yaml
sensor:
  - platform: citybikes
    name: Bay_Wheels_Home
    network: bay-wheels
    radius: 500
    stations:
      - "d5f8f842d3345445b0b23020585133a8"
      - "5696186831495207797382173413542"

And here’s an example to monitor Citi Bike stations near Times Square in NYC, regardless of where my home is located:

# Example in sensors.yaml or configuration.yaml
sensor:
  - platform: citybikes
    name: CitiBike_TimesSq
    network: citibike-nyc
    latitude: 40.7580
    longitude: -73.9855
    radius: 300

If you want to dive deeper into structuring your files, I recommend reading this guide on mastering YAML templates and code reuse.

Next-Level Automations with CityBikes

The real magic of Home Assistant happens when you use these sensors to build automations. Here are a few ideas I’ve tested that work like a charm:

  1. Smart Morning Commute Alert: Create an automation that, at 8:00 AM on weekdays, checks the sensor for your nearest station. If there are fewer than 3 bikes available, it sends a notification to your phone: “Heads up! Only a few bikes left at Station X. Consider leaving early or using Station Y.”
  2. At-a-Glance Visual Indicator: If you have a Zigbee smart bulb on your desk, change its color based on availability. Green if there are 5+ bikes, yellow for 1-4, and red if there are none. It’s an instant visual cue to know if a bike is an option. If you’re new to Zigbee, this guide on running ZHA and Zigbee2MQTT simultaneously is a great place to start.
  3. Smart Docking Advisory: Trigger an automation when you arrive in your home zone. If your destination station has fewer than 2 free docks, it alerts you to head to a nearby alternative with more space.

Troubleshooting Common CityBikes Issues

While the integration is very stable, you might run into a snag. Here are solutions to the most common problems:

  • Problem: No sensors are being created.
    Solution: Double-check that your network ID is correct. Make sure your radius is large enough and that your Home Assistant location is correctly configured under Settings > System > General.
  • Problem: The data seems stale.
    Solution: The integration polls for new data every few minutes. If the problem persists, the API for your city’s bike service might be temporarily down. You can usually verify this on their official website or app.
  • Problem: The integration doesn’t appear in the list to add.
    Solution: Ensure your Home Assistant instance is updated to a recent version. CityBikes is a core integration, so it requires no manual installation.

For more technical details, you can always consult the official CityBikes integration documentation on the Home Assistant website.

Beyond CityBikes: Other Smart Mobility Integrations

CityBikes is fantastic, but it’s not the only way to bring urban mobility into your smart home. I highly recommend exploring other integrations that allow you to track local public transit schedules for buses and subways. Combining this data gives you a complete, real-time overview of your transportation options every single day.

In short, setting up the CityBikes Home Assistant integration is a simple step that unlocks a world of possibilities for optimizing your commute, saving time, and contributing to a more sustainable city. Give it a try!

Subscribe for More on YouTube

Subscribe to the Tecnoyfoto YouTube channel