HomeKit Bridge: scene sends both TargetTemperature and HeatingThreshold as setHeatingSetpoint in random order

Hub / firmware: C-7, reproduced on 2.5.2.129 and again after updating to 2.5.2.139

Setup

  • Heat-only thermostats (floor heating). Component children using the built-in Generic Component Thermostat driver.
  • Attributes: supportedThermostatModes = ["heat","off"], supportedThermostatFanModes = [], no coolingSetpoint.
  • Exported by HomeKit Bridge as Thermostat.
  • An Apple Home scene sets several thermostats to Heat with a target temperature, and others to Off.

Problem
When the scene runs, HomeKit Bridge calls setHeatingSetpoint twice with different values on the same device within a few ms, in no consistent order. It also calls setCoolingSetpoint(15.0), which this heat-only device can't use. Whichever value is processed last wins, so the room ends up at the wrong setpoint on some runs and the right one on others.

Device events for one thermostat (producedBy: HomeKit Bridge), same scene run twice, 5 s apart (2.5.2.129):

22:30:09.297  setHeatingSetpoint(25.0)
22:30:09.297  setHeatingSetpoint(24.0)
22:30:09.299  setCoolingSetpoint(15.0)
22:30:09.301  setThermostatMode(heat)

22:30:14.234  setHeatingSetpoint(25.0)
22:30:14.241  setCoolingSetpoint(15.0)
22:30:14.242  setThermostatMode(heat)
22:30:14.253  setHeatingSetpoint(24.0)

After updating to 2.5.2.139, the same scene run 3 times. Order in which the two values reached the driver:

Run 1st 2nd
22:43:10 24 25
22:43:15 25 24
22:43:29 24 25

The intended value is 24, so the result is effectively random. A second thermostat in the same scene shows the same pattern (25 and 23). Thermostats where the two values happen to be equal get only one call, which is why only some rooms are affected.

What I think is happening (hypothesis)

  • TargetTemperature and HeatingThresholdTemperature are both mapped to setHeatingSetpoint, and the scene replays both concurrently.
  • The threshold stored in the scene is stale, because it isn't visible or editable in the Home app's scene editor for a Heat-mode thermostat.
  • The device only gets two identical commands, so the driver has no way to tell which one is the real target.

Expected

  • In Heat (or Cool) mode, apply only TargetTemperature and ignore the thresholds, which only matter in Auto; or
  • don't expose Heating/CoolingThresholdTemperature for thermostats whose supportedThermostatModes doesn't include auto; or
  • at least map the thresholds to something distinguishable from TargetTemperature.

Workaround for now
Take the thermostats out of the Home scene and set them from a Rule Machine rule triggered by a virtual switch.

Happy to provide more logs or test a beta build.