Skip to content

ruchoff/homeassistant-citibike

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Home Assistant CitiBike Station Status Sensor

hacs GitHub Release HACS validation HASSFEST validation license

This integration provides real-time data about bike share stations across multiple city networks within Home Assistant. It allows you to track bike availability, docking spaces, and station status for a variety of bike share programs, including CitiBike, Bay Wheels, Divvy, CoGo, Capital Bikeshare, and BIKETOWN. By fetching information from each city's official GraphQL feed, it helps you stay up to date with the availability of bikes in real-time.

Supported Networks:

Features

  • Track the number of available bikes and docking spaces at each station
  • Monitor station status, including whether bikes are available for renting and if the station is accepting bike returns
  • Display additional station attributes, such as location, capacity, and availability of bike types
  • Automatically updates data at regular intervals to provide real-time information
  • Choose from multiple bike share networks and view station details within the selected network
  • Station selection list is sorted by distance to your Home Zone for easy setup
  • Efficient network data caching to minimize API calls when monitoring multiple stations

Installation

HACS (Home Assistant Community Store)

Add to HACS

Manual Installation

  1. Download the citibike folder from this repository.
  2. Copy the citibike folder into your custom_components directory in Home Assistant.

Configuration

  1. In Home Assistant, navigate to Configuration > Devices & Services.
  2. Click Add Integration and search for "CitiBike".
  3. Select the Network you want to track (e.g., Bay Wheels, Divvy, CoGo, Capital Bikeshare, or BIKETOWN).
  4. After selecting the network, a dropdown will appear with a list of stations within that network. Choose the station you want to monitor.

Sensor State and Attributes

Sensor State:

  • The state of the sensor will display the number of available bikes at the station.

Sensor Attributes:

Each sensor will include the following attributes:

Attribute Description Example
station_id The unique identifier for the station. 6432.11
station_name The name or location of the station. E 40 St & Park Ave
network The name of the bike share network of the station. CitiBike
latitude The latitude coordinate of the station. 40.748817
longitude The longitude coordinate of the station. -73.985428
total_rideables_available The total number of rideables (bikes and e-bikes) available for rent. 23
station_capacity The total number of docking spaces available at the station. 40
docks_available The number of available docking spaces at the station. 10
available_bike_types The types of bikes available for rent (e.g., "Human Powered" and "Electric Powered"). Human Powered: 7, Electric Powered: 16
max_ebike_distance The maximum distance that an e-bike at this station can travel, based on the remaining battery life. 35 miles
ebike_status The status of each available e-bike, including battery percentage and remaining distance. bike_id: ...0123, battery_percent: 99, distance_remaining: 35 miles
last_reported The timestamp when the station's data was last updated. 2025-01-01T23:59:59
is_offline Indicates whether the station is offline (True/False). False

Acknowledgements

This integration uses data from each network's system, which is provided via each's respective GraphQL Feed. Special thanks to Lyft Bikes and Scooters, LLC for providing this data to the public under their Data License Agreement.

GraphQL Feeds

Data License Agreements

Important: This integration is not affiliated with or endorsed by Bikeshare (Lyft Bikes and Scooters, LLC) or Citigroup, Inc., and the data is provided "as is" without warranties regarding its availability or accuracy.

About

NYC Citi Bike Station status sensor for Home Assistant

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages