better_thermostat icon indicating copy to clipboard operation
better_thermostat copied to clipboard

Support for external temperature sensor for Aqara E1 Thermostat

Open phuhl opened this issue 1 year ago • 11 comments

Hi, thanks for the great integration!

What is the feature?

Currently the Aqara E1 can only be controlled in "Target Temperature Based" mode. I am not sure if the E1 supports offset mode (as I am not entirely sure, how it is implemented) but it does support an external temperature sensor.

It would be great if the E1 could be used in offset mode or something like it, using the external sensor :)

Description

This doucmentation shows that the sensor enum can be set to external. This post seems to show how the temperature would be published to the device.

phuhl avatar Oct 10 '23 12:10 phuhl

Just came here for the very same reason :)

The model number is Xiaomi SRTS-A01 (I haven't found anything containing the last string in this repo, so I am posting it here for reference)

chris400 avatar Oct 15 '23 10:10 chris400

Seems to be possible in general according to that issue: https://github.com/Koenkk/zigbee2mqtt/discussions/14291

tobimai avatar Oct 15 '23 11:10 tobimai

Perhaps i'm consued but why use offset mode if you're using an external sensor? Or did i misread you.

I have the same thermostat and using some aquare sensors to get the room temperature as the thermostat is absolutly not a good place to measure as it's quite hot compared when heating. So i would see the option of offset using the thermostat itself but when using an external sensor it doesn't make sense to me.

swoopdk avatar Oct 19 '23 08:10 swoopdk

@swoopdk the FAQ explains it pretty well: https://better-thermostat.org//qanda/modes

chris400 avatar Oct 19 '23 11:10 chris400

@swoopdk the FAQ explains it pretty well: https://better-thermostat.org//qanda/modes

You're correct - i should ahve looked there before :) I have just gotten used to current setup and i must admit it would be nice to have the TRV show the actual room temp instead of it's personal setting as it ranges quite alot from 5 degrees to much higher to maintain my preset of 20 through external sensor :)

swoopdk avatar Oct 19 '23 11:10 swoopdk

I too would be happy to have this feature supported via nice GUI such as BT... 😃

zzois avatar Oct 19 '23 14:10 zzois

would be also interested. At the moment I use target calibration and configure external temperatures via nodered automatically in the TRVs.

koseduhemak avatar Nov 11 '23 09:11 koseduhemak

+1 offset mode

alexanderek avatar Nov 16 '23 21:11 alexanderek

Seems it will finally be possible in ZHA to set the temperature from an external sensor. I already downloaded the quirk to my custom quirks folder and it works perfectly. See here: https://github.com/zigpy/zha-device-handlers/pull/2802 Not merged yet, but i think it will be in the next release.

Currently i have set the Zigbee cluster sensor manually to external in the TRV and I'm updating the Zigbee Cluster sensor_temp with an automation but it would be really nice if BT supported this TRV

This is my automation, triggered by a temperature change of the external temperature sensor:

service: zha.set_zigbee_cluster_attribute
data:
  cluster_type: in
  ieee: xxxxxxxxxx
  endpoint_id: 1
  cluster_id: 64704
  attribute: 5010
  value: "{{ (float(trigger.to_state.state) * 100)|int }}"

tr4nt0r avatar Jan 27 '24 16:01 tr4nt0r

I do get Error: Error rendering data template: UndefinedError: 'dict object' has no attribute 'to_state' when using zhaquirks.xiaomi.aqara.weather.Weather2 as external sensor.. You got any clue why? My YAML looks like this

alias: Set temp
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.temp_kitchen
condition: []
action:
  - service: zha.set_zigbee_cluster_attribute
    data:
      cluster_type: in
      ieee: xx:xx:xx:xx:xx:xx:xx:xx
      endpoint_id: 1
      cluster_id: 64704
      attribute: 5010
      value: "{{ (float(trigger.to_state.state) * 100)|int }}"
mode: single

Update: I think I fixed it by using states('<entity_id>')

Patrick-DE avatar Jan 30 '24 22:01 Patrick-DE

trigger.to_state.state becomes available when it is triggered by a temp change, but accessing the entity directly is also fine. By the way, if it wasn't clear, the ieee is the address of the thermostat, not the sensor. You write the temperature from the external sensor into the thermostat. And don't forget to set the thermostat to external sensor like i did ^^

tr4nt0r avatar Jan 31 '24 02:01 tr4nt0r