Swiss Charging Stations (ich-tanke-strom.ch)

Swiss Charging Stations (ich-tanke-strom.ch)

Swiss Charging Stations — real-time EV charger availability from ich-tanke-strom.ch

Real-time availability of public EV charging stations in Switzerland (~19,000 charging points), sourced from the official ich-tanke-strom.ch platform (BFE / EnergieSchweiz / swisstopo).

What it does

  • One geo_location entity per charging station within your configured radius — shows up automatically on any Map card with live status (available/occupied/out of service) right on the marker
  • sensor.charging_stations_available_<radius>km — count of currently available stations matching your filters
  • Live-adjustable filters, no restart needed: number.charging_stations_min_power_kw (e.g. fast chargers only), select.charging_stations_plug_type, select.charging_stations_status, select.charging_stations_operator — options are discovered dynamically from stations in range
  • Automatic dashboard setup with a preconfigured map on first install
  • Multi-language (DE/EN/FR/IT)

Install via HACS
Add as a custom repository: https://github.com/prusuino/ha_swiss_charging_stations

GitHub: GitHub - prusuino/ha_swiss_charging_stations: Home Assistant custom integration for real-time Swiss EV charging station availability (ich-tanke-strom.ch) · GitHub

Hi Tinu,
thanks for this integration - I was working the last day’s on a similar thing, but more focussed on favourited charging points (since my charger will be mounted in August :frowning: ) :

it shows the status of the charger (free, busy, out of order, closed) with a filter of charging types.

maybe we can have a look and combine this? :wink:

best regards,
Marco

Hi Marco,

I’ve already been working on the favorites. Thanks for the tip.
Favorites are now live in v1.1.1. When you add the integration, you get a mode choice: “Radius overview” (the existing map view) or “Pin a single favorite station”. For a favorite, you either enter the station’s EvseID directly (e.g. from a QR code on the charger — same idea as your dialog), or search near a location with optional minimum-power and plug-type filters and pick from a distance-sorted list. You can add it as many times as you like for multiple favorites, each fully independent.

Each favorite gets:

  • a status sensor (available / occupied / out of service)
  • a dedicated charging-power sensor (kW)
  • a plug-type sensor
  • an operator sensor
  • a station-ID sensor
  • a map marker (distance shown relative to your home)

Release: Release v1.1.1 · prusuino/ha_swiss_charging_stations
GitHub: GitHub - prusuino/ha_swiss_charging_stations: Home Assistant custom integration for real-time Swiss EV charging station availability (ich-tanke-strom.ch) · GitHub

Would love it if you tried it out and let me know how it works for you — thanks again for the nudge!

1 Like

Hi Tinu,
many thanks for your replay and the update. This is awesome!

For my use case, im combining the chargers into “one station”, for example:

You have four single chargers - so if I want to have all of them within HA, i need to add them four times. My approach was to use the Station-ID “CHMIGP*1797” and all stations will be included - like on ich-tanke-strom.ch

for my use case, the benefit is, i have indication of the total amount of available and used chargers.
But I guess its kind of en “chicken or egg problem”.

maybe one more thing - also for my use-case: I would love to disable the location markers, as I dont want to fill up my map with lots of things.

Liebi Grüess,
Marco

That occurred to me a little while ago, too; I’m currently looking for a solution :slight_smile:

Hi Marco,

I rebuilt the repository (new commit history), so if you have it added as a custom repository in HACS, you’ll need to remove it and re-add it (same URL: GitHub - prusuino/ha_swiss_charging_stations: Home Assistant custom integration for real-time Swiss EV charging station availability (ich-tanke-strom.ch) · GitHub) — otherwise HACS will show an error since it’s tracking the old repository internally.

While I was at it, I also implemented what you suggested: you can now favorite an entire charging site instead of just a single connector. When searching near a location, the picker now also lists whole sites (marked with a :round_pushpin: icon and the number of charge points) alongside individual connectors — picking one creates a device with a summary sensor plus status/power/plug type/operator sensors for every connector at that site.

I also removed the map marker for favorites entirely, since you mentioned you didn’t want it cluttering your map — the radius overview already covers that.

I looked into replicating the colored status boxes like on ich-tanke-strom.ch itself (green/red per connector) as an auto-generated dashboard card, but Home Assistant’s built-in cards don’t support that kind of styling out of the box — still on my list to look into further at some point.

Would be great if you could test it again with the new version (v1.2.0) once you’ve re-added the repo.

Hi Tinu,
many thanks for the update - it works very well.

Two more things:
I had to hide the charging station, when I favourited it, it still was visible on the map:


=> no big deal at all

regarding merging the station:
i’ve double checked the Migrol one in Möhlin, there are two chargers with two cables each. The component detects two single stations with two cables. For me as a human its just one station/location - so personally, it would help for me to have it as a single single entity with a total of four chargers.

have a great weekend,
Marco

Three updates are out, HACS should offer you v1.3.0:

Merged charging sites (v1.2.1): You were right about the Migrol site in Möhlin. The source data reports each pole as its own station there (that’s also why Tesla superchargers showed up as 10 separate one-connector “stations”). Stations sharing the same operator and address are now merged into a single location — your Möhlin site appears as one location with 4 charge points and can be favorited as a whole. One note: existing favorites keep working unchanged, so to get the merged view, remove the two old favorites and re-add the site as a single location favorite.

Graphical status card (v1.3.0): Remember the colored status boxes I mentioned I’d revisit? They’re in now. The integration ships its own Lovelace card — one colored box per charge point (green = available, red = occupied, gray = out of service) with plug type, power, and status, plus an available/total badge for the site. It registers itself automatically (no manual resource setup) and is used on the auto-generated Favorites view; you’ll also find it in the card picker as “Swiss Charging Stations Card” if you want to place it anywhere else.

Map marker after favoriting: That one’s expected behavior for now — the marker belongs to the radius overview, and the map card reads directly from the state machine, so the entity’s “Visible” toggle doesn’t affect it. Hiding it the way you did is the right workaround; a cleaner solution is on the list.

Also new in v1.2.2: whole-site entries in the favorite picker now show the distance in km.

Have a great weekend, and keep the feedback coming!

1 Like

Swiss Charging Stations (ich-tanke-strom.ch) — real-time EV charger availability for Switzerland

A custom integration that brings the live status of roughly 19,000 public charging points across Switzerland into Home Assistant, sourced from the official ich-tanke-strom.ch open data platform (BFE / EnergieSchweiz / swisstopo). No account, no API key.

Three ways to use it (pick one when adding the integration — repeatable, add it again for more):

:world_map: Radius overview — all charging sites within a radius (up to 30 km) around any location. The integration auto-creates a dashboard with a map showing one marker per charging site, labeled with live availability like “6/7 available” — sites with several chargers are grouped instead of stacking markers on top of each other. Live-adjustable filters (minimum power, plug type, availability, operator) via number/select entities — changes apply immediately.

:star: Favorite station — pin a single charge point you care about (your regular charger), either by entering its EvseID (e.g. from the QR code on the charger) or by searching around a location. You get sensors for status, power, plug type, operator, and station ID.

:round_pushpin: Favorite site — pin a whole charging site: one device with a summary sensor (available/total) plus a full sensor set per connector. Sites that the source data reports as several separate stations (same operator and address) are merged automatically.

Bundled Lovelace card: the integration ships its own swiss-charging-stations-card — colored status boxes per connector (green = available, red = occupied, gray = out of service) with plug type, power, and status. It registers itself automatically, has a visual config editor with an entity picker, and is used on the auto-generated “Favorites” dashboard view out of the box.

Other bits:

  • Fully localized: German, English, French, Italian (follows your HA language)
  • Favorites get a pre-filled dashboard card automatically, kept in sync with the site’s connectors
  • Data refreshes every 5 minutes; robust against the occasional malformed record in the source data

Installation: HACS → Custom repositories → add https://github.com/prusuino/ha_swiss_charging_stations (category: Integration), then install “Swiss Charging Stations” and restart.

Screenshots, full entity reference, and changelog: GitHub - prusuino/ha_swiss_charging_stations: Home Assistant custom integration for real-time Swiss EV charging station availability (ich-tanke-strom.ch) · GitHub

Data: ich-tanke-strom.ch (BFE / EnergieSchweiz / swisstopo), used under its open data terms with attribution. Feedback and ideas welcome — several of the recent features came directly from feedback in this thread.

Good morning Tinu,
wow - you made a huge progress - I love it. I like the grouping function.

I’ve tested version 1.4 a few minutes ago.

Since I don’t need the map, i wanted to delete the extra dashboard but I couldn’t:

Had to restart the Home Assistant Container, then I was able to. Looking forward how it goes for the updates. => no big deal at all :slight_smile:

May I place two more feature request:
Global Status
How about a global status of the whole charging station - Im mainly using it for public stations nearby shopping center and they are closed sometimes during the night - like the Lidl one in Oeschgen:

How about a global status within the sensors, as you have per charging station:


Benefit: You see the reason why it’s not available. Some stations provide an opening hour information by the API.

Adding a station by ID
This is just a wellbeing/cosmetic feature. If you want to add a station that is a bit further away, you need to find its coordinates on Google Maps and paste them into the search dialogue. Since these stations have unique IDs, you might want to copy and paste the ID into the configuration flow.

schöns Wucheänd,
Marco

Hi Marco,

all three of your points made it into v1.5.0:

Site status: Whole-site favorites now have a derived overall status — Available / Occupied / Closed / Out of service. The data source unfortunately publishes no opening hours, but “every connector out of service at a non-24h site” reliably means closed outside opening hours (I verified this against your Lidl example in Oeschgen — in the evening it now shows “Closed” instead of “0/3 available”). It appears as a badge on the graphical card, as its own status sensor right below the available-count, and on the map markers of the radius view. The sensor also carries a raw site_status attribute if you want to automate on it.

Adding by ID: The ID field in the favorite setup now accepts a whole-site ChargingStationId in addition to a single charge point’s EvseID — so you can add an entire site directly without searching by location.

Dashboard deletion: That was indeed a bug — the auto-created dashboard came back after a restart if you had deleted it. Fixed: it’s now created only once, deleting it sticks. The sidebar entry itself needs one restart to disappear; that part is a Home Assistant limitation for panels registered by integrations.

Dir au es schöns Wucheänd. Gruess

Good morning Tinu,
wow - you’re awesome! Im getting my EV tmrw and its just at the right time :slight_smile:

I’ve tested version 1.5 and i really love the add version by using the GUID/ID of the station.

I might discovered a little bug:
adding a charger station by the GUID works very welle (example: e3688f8e-478d-11f1-b8c6-42010aa40fdd)

When using the “Displayname” it does not load all the chargers, i’ve double checked there are no filters for sockets in the list. A few test examples:

CH*MIG*P*1797 > ich-tanke-strom: 4x CCS and HA shows only two

Same behaviour with:

CH*POW*E88340 > 3 on web site > 1 in HA
CH*ECUE3AWUCZHP3MX75C5GC2Q74CG5GZ > 8 on web site > 1 in HA

It looks like it drills down to the first available data set.

EDIT: Maybe something with the opening hours does not fit - tested with the Migrol above:
The API returns the opening hours (maybe not for all stations) , currently its closed and the addons shows the chargers available:

  "IsOpen24Hours": false,
    "OpeningTimes": [
      {
        "Period": [
          {
            "begin": "08:00",
            "end": "18:00"
          }
        ],
        "on": "Saturday"
      },
      {
        "Period": [
          {
            "begin": "08:00",
            "end": "20:00"
          }
        ],
        "on": "Friday"
      },
      {
        "Period": [
          {
            "begin": "08:00",
            "end": "19:00"
          }
        ],
        "on": "Thursday"
      },
      {
        "Period": [
          {
            "begin": "08:00",
            "end": "19:00"
          }
        ],
        "on": "Wednesday"
      },
      {
        "Period": [
          {
            "begin": "08:00",
            "end": "19:00"
          }
        ],
        "on": "Tuesday"
      },
      {
        "Period": [
          {
            "begin": "08:00",
            "end": "19:00"
          }
        ],
        "on": "Monday"
      }

So the status should be closed.

If you want, I can try to fork your repo and try to implement this - to be honest: Codex will, I’m not a coder but my chatty friend can do the work :slight_smile:

Schöne Sunntig,
Marco

Thanks Marco, great find — and your GUID observation pointed straight at the root cause. :+1:

Just released v1.6.1 which fixes exactly this.

What was going on: the source data only has two ID levels (EvseID = one charge point, ChargingStationId = one “station”), but what a “station” covers depends on the operator: Lidl/GOFAST etc. use one GUID for the whol
e site (that’s why your GUID worked), Migros gives each pole its own ID (CH*MIG*P*1797 covers only 2 of the 4 chargers at that address), and PowerUp/the aggregators use one ID per cable (that’s your 1-of-3 and 1-of-8 ca
ses). The location picker has merged those by operator+address since v1.2.1 — but the add-by-ID path skipped that merge entirely. My bad.

In v1.6.1:

  • Any ID you enter is now resolved to the full physical site (same operator+address merge as the picker). CH*MIG*P*1797 → 4 chargers, CH*POW*E88340 → 3, your CH*ECUE... → all 8.
  • If you enter a single charge point’s EvseID and the site has more, you now get a choice: pin just that charge point, or the whole site (default).
  • New confirmation step shows what was resolved and lets you set a custom name (the ID path never offered that before).
  • And you were right about the opening hours too — the source does have an OpeningTimes schedule for some operators (it’s just empty for 24h sites, which is why I missed it). Site status now evaluates it: a site outside its opening hours shows as “Closed” even if the operator still reports the connectors as “Available”, and today’s opening hours are shown on the card below the address and on the dashboard card.

Update via HACS and restart. Thanks again for the detailed report with the exact IDs — that made it easy to reproduce against the live data.

Glad to help :star_struck:

Updated to version 1.6.1 and it works like a charm. One last thing i
recognized:

The station is closed but the chargers are still available. Thats technically, from an API perspective, correct but you can’t charge right now. I would suggest to set them to “closed” too - just in case you’re just looking at the green tiles.

EDIT: Found another possible bug - filtering of plug types:
Station:

CH*POW*E88341

Adding the station by ID:

The station has three plugs, two of them are CCS 2

The component counts the AdeMO in:

And the card shows it as well:

Good points — the first one is released in v1.6.4: while a site is closed, the tiles no longer stay green. They turn blue with “Closed” — blue as its own color next to green (available), red (occupied), gray (out of service) and yellow (unknown status), so a closed site doesn’t look broken. The badge also distinguishes a full-day closure (“Closed today”, e.g. Sundays) from being outside today’s hours (“Closed”), the availability badge is now green/red depending on whether something is still free, and the card shows the site’s weekly opening schedule below the address (“Mon–Fri 08:00–20:00 · Sat 07:30–18:00”).

The sensors themselves keep reporting the raw operator status (“Available”), so automations still see exactly what the API says — plus site_status and closed_all_day_today attributes if you want to act on the derived state.

On the plug types at CHPOWE88341: I checked the live source data — that site really does have three charge points: 2× CCS Combo 2 at 165 kW (E88339, E88341) and 1× CHAdeMO at 50 kW (E88340, its station name literally contains “CHAdeMO”). So the card showing a CHAdeMO tile is the source data, not a counting bug.

What I suspect happened: the plug-type filter in the favorite dialog only applies to the search by location path — it’s ignored when you enter an ID directly (the field labels say “only used if the ID is empty”). And that’s intentional: I think it’s more useful for a site favorite to always show the complete site, even when a filter was set during the search. The filter is there to help you find a suitable site; the favorite then mirrors the physical reality — hiding connectors would make the counts and the site status misleading (a “1/2 available” that is actually a 1/3 site). Since every tile shows its own plug type, you can spot your CCS chargers at a glance anyway.
I need to think about it—or what do you think makes more sense for the user?

Schöne Sunntig Tinu

your use case makes sense, so v1.6.5 adds it where it belongs — on the card: the visual editor now has a “visible plug types” multi-select. Pick CCS only and the CHAdeMO tile disappears, with the availability badge counting just the visible connectors (“1/2 available”). Purely visual — the favorite and all sensors keep covering the whole site. v1.6.5 also fixes a few things you may have run into: the auto-generated cards now work with the visual editor, your card edits survive restarts, tile order now matches the “Charge Point 1/2/3” sections, and deleted favorites can no longer leave their card behind.

Gruss Tinu

Hi Tinu,
thats just awesome :heart_eyes:

many thanks for your integration.

Liebi Grüess,
Marco

You’re welcome. Thanks for testing it.

Gruess
Tinu