Exposing PID Climate target_temperature for display on ESPHome device

Hello everyone,

I’m currently working on a home automation project using ESPHome and Home Assistant, and I’m facing a challenge with integrating two ESPHome devices.

I have two devices:

  1. Floor Heating Actuator Controller: This device controls the actuators of my underfloor heating system. It includes a PID controller to manage the heating process.
  2. Room Thermostat: This device is intended to serve as a room thermostat, equipped with a display to show various environmental data.

The goal is to have the room thermostat display the target_temperature from the PID controller running on the actuator controller device. Both devices are successfully connected to Home Assistant, but I’m unsure how to configure them so that the thermostat can receive and display the target temperature from the PID controller.

Has anyone successfully implemented a similar setup, or could provide guidance on how to achieve this integration? Any advice or examples would be greatly appreciated!

Thank you in advance for your help!

This is what I tried, but it dosen’t work

## File rtwz.yaml

esphome:
  name: rtwz
  friendly_name: Raumthermostat Wohnzimmer

# load all packages
# packages in common are shared between all devices
# packages in the main dir are for room-sensor devices only
# "secrets.yaml" file is not included in the repository!
packages:
  wifi: !include common/wifi.yaml
  ha_base: !include common/base.yaml
  fonts: !include common/fonts.yaml
  ota: !include common/ota.yaml
  display: !include display.yaml
  sensor: !include htu21.yaml
  i2c: !include i2c.yaml
  
esp32:
  board: az-delivery-devkit-v4
  framework:
    type: arduino

sensor:      
  - platform: homeassistant
    id: target
    entity_id: input_number.wozi_soll
## File fbh-aktor01.yaml

esphome:
  name: fbh-aktor-01
  friendly_name: Aktor-Steuerung für die Fußbodenheizung unten

packages:
  wifi: !include common/wifi.yaml
  ha_base: !include common/base.yaml
  fonts: !include common/fonts.yaml
  ota: !include common/ota.yaml
  
esp8266:
  board: nodemcuv2
  framework:
    version: recommended

output:
  - platform: sigma_delta_output
    update_interval: 10s
    id: sd_channel_01
    pin: GPIO04        
      
sensor:
  - platform: homeassistant
    id: sd_channel_01_sensor
    entity_id: sensor.rtwz_temperature

  - platform: pid
    name: "PID Climate Result"
    type: RESULT
    climate_id: pid_c_wozi
          
# Example configuration entry
climate:
  - platform: pid
    id: pid_c_wozi
    name: "PID Climate Controller"
    sensor: sd_channel_01_sensor
    default_target_temperature: 20°C
    heat_output: sd_channel_01
    control_parameters:
      kp: 0.49460
      ki: 0.00487
      kd: 12.56301
      output_averaging_samples: 5      # smooth the output over 5 samples
      derivative_averaging_samples: 5  # smooth the derivative value over 10 samples
    deadband_parameters:
      threshold_high: 0.2°C       # deadband within +/-0.5°C of target_temperature
      threshold_low: -0.2°C
    on_state:
      number.set:
        id: ha_wozi_target
        value: !lambda "return x.target_temperature;"

number:
  - platform: homeassistant
    id: ha_wozi_target
    name: "Wohnzimmer Solltemperatur"
    entity_id: input_number.wozi_soll
## File display.yaml
display:
  - platform: ssd1306_i2c
    model: "SSD1306 128x64"
    address: 0x3C
    lambda: |-
      //   it.print(0, 0, id(arial14), "Hello World!");
      //      it.print(0, 15, id(arial14),
      // Print time in HH:MM format
      it.strftime(0, 60, id(verdana36), TextAlign::BASELINE_LEFT, "%H:%M", id(esptime).now());

      if (id(temp).has_state()) {
        it.printf(60, 28, id(arial14), TextAlign::BASELINE_RIGHT , "%.1f°", id(temp).state);
      }

      if (id(hum).has_state()) {
        it.printf(68, 28, id(arial14), TextAlign::BASELINE_LEFT , "%.1f%%", id(hum).state);
      }

      if (id(target).has_state()) {
        it.printf(0, 0, id(arial14),  "Soll: %.1f°", id(target).state);
      }

Did you find how to do it? I’m facing the same dilama.