Skip to content
Smart Home · Home Automation Box Guides

Guide: Integrate WES server into Home Assistant for consumption monitoring

This guide explains step by step how to retrieve data from Cartelectronic's WES server for use in Home Assistant.

By Cédric Locqueneux Updated on 8 min read
titre ha wes
165,00€
at Domadoo
See the deal

Résumer cet article :

I’ve been using Cartelectronic’s WES server for several years now. It’s a small box that integrates into the electrical panel and is capable of monitoring all of the household’s energy consumption, whether it’s electricity via teleinfo or clamp meters, water, gas, and much more. It’s an extremely comprehensive server, self-sufficient. But since Home Assistant offers a very well-designed energy chart, I wanted to be able to integrate the WES server into this home automation system. This guide will help you do the same. Prerequisites You’ll of course need a working WES server connected to the network, as well as a working Home Assistant installation.

First of all, to keep my Home Assistant configuration file from getting overloaded, I split it into several files, something the developers originally provided. Here we will have two files:

sensors.yaml, which will contain the configuration of all WES sensors

customize.yaml, which will allow you to customize these sensors so that they are correctly recognized by the Home Assistant Energy table

  • To do this, simply add these lines to the configuration.yaml file if you don’t already have them:
  • sensor: !include sensors.yaml

#Customizing Home Assistant

It groups all the useful information in this format:

We simply need to declare the various desired information in Home Assistant. To do this, in the sensors.yaml file (create it in your homeassistant directory if you don’t already have it), we need to declare the connection to the WES server:

– platform: rest

name: wesdata

#Replace with your WES server IP

friendly_name: “Peak Hours Index”

unique_id: westic1hp

friendly_name: “Blue Peak Hours Index”

unique_id: westic1bleuhp

device_class: energy

unique_id: westic2prod

unique_id: westic1tarif

unique_id: wespince1inst

friendly_name: “Water Meter”

unique_id: wesimpulsion1 device_class: waterunit_of_measurement: ‘L’

device_class: temperature unit_of_measurement: ‘°C’value_template: >-

{{ states.sensor.wesdata.attributes| float }}

friendly_name: “Relay 2”

Integrate WES into Home Assistant’s Energy Dashboard

Home Assistant’s Energy dashboard is really well done. But it only accepts indexes or total consumption meters. One might think this is good for WES, since we’ve created sensors for indexes. Except that to appear in the list of compatible devices in the Energy dashboard, these sensors must have a “state_class: total” argument. While this argument can be included directly in the MQTT sensor configuration, this isn’t the case for the sensors created here for WES, since we’re dealing with REST calls, not MQTT calls. Fortunately, we can modify the sensor declaration in a customize.yaml file by adding this type of code for each sensor representing total consumption:

state_class: total

device:

identifiers: “WES Server”

name: “WES Server”

model: “WES”

manufacturer: “Cartelectronic”

I’ll leave my complete file here:

Download the customize.yaml file

Simply place it in the homeassistant directory, then restart Home Assistant again (after verifying that the code is correct).

post on the WES manufacturer’s forum

a

post on the HACF forum

The Home Assistant documentation also provides a better understanding of how REST sensors work.

Native MQTT compatibility would have made things much easier, but ultimately, we’re able to retrieve all the WES data, which can be used perfectly in Home Assistant—that’s the main thing. The integration has been working for me for a little over a month now, with no issues to report. I’m able to use my WES, which saves me from having to multiply the sensors, since it handles so many things natively. This guide might help some of you who, like me, were looking for a way to do this!

Résumer cet article :

Cédric Locqueneux

I'm Cédric Locqueneux, and I've been doing home automation since 2003: back then, I was already controlling the flat I rented with X10 modules and the HomeSeer software. In 2007, I created Maison et Domotique while automating the house we were having built. Since then, I have been testing home automation hubs, connected devices and energy management solutions at home, every day, from heating to solar power. I am also editor-in-chief of SmartHome Electricien+, the magazine for electricians and home automation installers, and the author of “Le Guide de la maison et des objets connectés” (Eyrolles, 2016). I have served on the jury of the CES Innovation Awards in Las Vegas for five editions, and was a board member of the French home automation federation (Fédération Française de Domotique) from 2012 to 2017. With a vocational electrician's diploma (CAP) since 2025, I also know the subject from the installer's side.

All articles
The newsletter

Never miss a review again

Every week: our latest reviews, the new products to watch and the best home, smart home, high-tech and energy deals, straight to your inbox.

Free · Unsubscribe in one click · Your address is never sold

  • Our reviews, carried out at home in everyday use
  • The best deals of the moment
  • Smart home news you shouldn't miss
Maison et Domotique
Logo
Compare items
  • Casques Audio (0)
  • Sondes de Piscine Connectées (0)
  • Smartphones (0)
Compare