CityBikes

The citybikes sensor platform monitors bike availability at bike sharing stations in a chosen area. The data is provided by CityBikes, which supports bike sharing systems all around the world.

Configuration

To enable it, add the following lines to your configuration.yamlconfiguration.yaml 文件是 Home Assistant 的主要配置文件。它列出了要加载的集成及其特定配置。在某些情况下,需要直接在 configuration.yaml 文件中手动编辑配置。大多数集成可以在 UI 中配置。 [Learn more] file. 在更改了configuration.yamlconfiguration.yaml 文件是 Home Assistant 的主要配置文件。它列出了要加载的集成及其特定配置。在某些情况下,需要直接在 configuration.yaml 文件中手动编辑配置。大多数集成可以在 UI 中配置。 [Learn more] 文件后,重启 Home Assistant 以应用更改。 该集成现在显示在集成页面的 设置 > 设备与服务 下。其实体在集成卡片上以及实体标签上列出。

# Example configuration.yaml entry (using radius)
sensor:
  - platform: citybikes
    radius: 200

Configuration Variables

name string (Optional)

The base name of this group of monitored stations. The entity ID of every monitored station in this group will be prefixed with this base name, in addition to the network ID.

network string (Optional)

The name of the bike sharing system to poll.

Default:

Defaults to the system that operates in the monitored location.

latitude string (Optional)

Latitude of the location, around which bike stations are monitored.

Default:

Defaults to the latitude in your configuration.yaml file.

longitude string (Optional)

Longitude of the location, around which bike stations are monitored.

Default:

Defaults to the longitude in your configuration.yaml file.

radius integer (Optional)

The radius (in meters or feet, depending on the Home Assistant configuration) around the monitored location. Only stations closer than this distance will be monitored. Either radius or stations are required.

stations list (Optional)

A list of specific stations to monitor. The list should contain station IDs or UIDs, which can be obtained from the CityBikes API. Either radius or stations are required.

Example

Additional configuration samples:

# Example configuration.yaml entry (using a list of stations)
sensor:
  - platform: citybikes
    name: Work Stations
    stations:
      - 123
      - 145
      - 436