An engineer's technical notebook

Boiling Water at Altitude in a "Smart Kettle"

October 24, 2026 · automation

As a coffee aficionado, I of course own a water kettle that can hold temperatures. I had a really cheap one and it was decent, but I had wanted a Fellow Stagg EKG+[1] for years. I never could really justify the cost of such a fancy kettle though. My friend was asked by his girlfriend to replace the black kettle with a pink one, so he gave me his old — but perfectly functioning — Stagg EKG+.

I've owned this kettle for years now, have really enjoyed using it, and will continue to love it.

Fellow Stagg EKG+ Kettle sitting on my countertop

The pretty black Fellow Stagg EKG+ Kettle on its base

Hidden Feature: Bluetooth

One of the neat little features that was barely advertised when this kettle was released is that it supports Bluetooth. It advertises itself over BLE, and with an app you download to your phone you can control the kettle remotely: set the temperature, turn it on/off, and watch the current temperature.

I've never really used the app on my phone. It's also of course insecure, in that anyone within Bluetooth range can see the BLE advertisement and connect to the kettle, but we are going to ignore that since it has enough built-in protections to stop it from burning my house down (at least, it seems like it does).

I have a large Home Assistant install, and was already running some ESPHome Bluetooth Proxies, so the next thing to do was to see if someone had already written a HACS plugin so that I could control the kettle. After some searching I found the ha-stagg-ekg-plus repository made by samwiseg0, and loaded it into my Home Assistant setup. It found my kettle and setup was dead simple. Now that I had the kettle in Home Assistant, the next thing to do was to write some automations... because the real fun in home automation is doing things like flashing your lights when the temperature reaches its setpoint.

Boiling at Altitude

I live at ~1,770 meters (5,800 ft[2]), which means that the boiling point of water is not actually 100C (212F), but far lower. Depending on the weather, and thus the pressure, it is either 93C (199.4F) or 94C (201.2F).

If you set the kettle to 100C, it will continue to run forever and will never shut off and go into hold mode. It will also boil the water so hard that, if you slightly overfill the kettle, it will start overflowing out of the pour spout even with the lid on.

So the next automation of course was to take the pressure from one of the many pressure sensors around my house and use that information to set the kettle to either 93C or 94C, automatically reacting to changes in the weather and updating the kettle before I even go to use it (Bluetooth commands are accepted and remembered even when the kettle is turned off)!

Antoine Equation for Water Vapour at a Given Pressure

Using the Antoine equation we can then write a formula that uses the pressure sensors to automatically set the boiling point.

Here p is the pressure in hPa, which the formula converts to mmHg.

(1730.63 / (8.07131 - log(p * 0.750062, 10)) - 233.426)

The Antoine equation relates the vapour pressure of a liquid to its temperature:

log⁡10P=A−BC+T\log_{10} P = A - \frac{B}{C + T}

Here P is in mmHg and T is in °C. Water boils when its vapour pressure equals the air pressure around it. So if you put in the air pressure and solve for T, you get the boiling point:

T=BA−log⁡10P−CT = \frac{B}{A - \log_{10} P} - C

The magic numbers

The Antoine equation is not a perfect fit and cannot actually be used across the whole saturated vapour pressure curve, so there are different sets of constants you plug in depending on the range you care about. That is good enough for our use case, since we floor() the result to a whole degree anyway.

The numbers here are straight from the Wikipedia page, so these are the well-known values:

NumberWhat it is
8.07131Antoine constant A for water
1730.63Antoine constant B for water (in C)
233.426Antoine constant C for water (in C)

Solving for T = 94 gives a P of ~610.6 mmHg (~814.1 hPa), so below that pressure the most we can heat to is 93C.

Home Assistant Automation (YAML)

id: kettle_boiling_point_limit
alias: "Kettle: Keep Target Below Boiling Point"
description: >-
  The Stagg EKG+ resets to 100 °C after losing power, and at altitude it
  never reaches that and boils forever. Lowers the target to the local
  boiling point (from the median house pressure sensor) whenever it is
  above it: 94 °C normally, 93 °C below about 814 hPa. Never raises a lower
  target.
triggers:
  - trigger: state
    entity_id: sensor.kitchen_stagg_ekg_target_temperature
  - trigger: state
    entity_id: climate.kitchen_stagg_ekg
    from:
      - unavailable
      - unknown
  - trigger: state
    entity_id: sensor.office_aranet4_pressure
  - trigger: homeassistant
    event: start
conditions:
  - condition: template
    value_template: >-
      {{ target | is_number and target | float > max_target | int }}
  - condition: template
    value_template: >-
      {{ states('climate.kitchen_stagg_ekg')
         not in ['unavailable', 'unknown'] }}
actions:
  - action: climate.set_temperature
    target:
      entity_id: climate.kitchen_stagg_ekg
    data:
      temperature: "{{ max_target | int }}"
  - action: logbook.log
    data:
      name: Stagg EKG+
      message: >-
        target lowered from {{ target }} °C to the local boiling point,
        {{ max_target }} °C
      entity_id: climate.kitchen_stagg_ekg
mode: queued
max: 3
variables:
  max_target: >-
    {%- set ps = [
          'sensor.office_aranet4_pressure',
          'sensor.main_bedroom_aranet4_pressure',
          'sensor.basement_atmospheric_pressure',
          'sensor.purpleair_outside_pressure',
        ] | map('states') | select('is_number') | map('float')
          | sort | list -%}
    {%- if ps | count == 0 -%}
      93
    {%- else -%}
      {%- set p = ps[(ps | count) // 2] -%}
      {{ (1730.63 / (8.07131 - log(p * 0.750062, 10)) - 233.426)
         | round(0, 'floor') | int }}
    {%- endif -%}
  target: "{{ states('sensor.kitchen_stagg_ekg_target_temperature') }}"

If no pressure sensors are available (and thus it can't calculate anything), the automation falls back to 93C so the kettle is at least set to the safe temperature.

Home Assistant Logbook entry detailing the temperature the kettle attempted to be set to, and the automation clamping it down to the local maximum

Setting the temperature above the allowed maximum forces the temperature to be clamped

Trying to set the temperature above the maximum setpoint will automatically clamp it, which means accidentally bumping the dial when turning the kettle on, or cranking it from a lower temperature (such as for specialty teas) up to max, will always leave it at the safe boiling temperature.

Home Assistant Logbook entry showing the kettle set itself to 100C, and the automation clamping it down to the local maximum again

Kettle restarts also clamp the boiling point automatically

Lastly, when the kettle's power is cycled it resets itself to 100C. As soon as it reconnects to Home Assistant it gets clamped back down to the maximum setpoint.

  1. This links to a newer version than the one I have. My Stagg EKG+ has since been replaced with a model that uses Wi-Fi, and there has been some work done to reverse engineer that protocol so it too can be added to Home Assistant. ↩

  2. Freedom Units ™ for the eagle-loving Americans that visit my blog. ↩