Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thermal Comfort won't work with the output of HA Helpers as input for temperature and humidity #390

Open
thomasvnl opened this issue Aug 28, 2024 · 1 comment

Comments

@thomasvnl
Copy link

thomasvnl commented Aug 28, 2024

Hi,

I have a usecase in which I combine the values from multiple sensors via a Min/Max helper set to the "mean/median" option (see: https://www.home-assistant.io/integrations/min_max/). I combine two sensors in two seperate helpers to get a more accurate outdoor temperature and humidity reading. I wanted to use Thermal Comfort to get the additional attributes like Heat Index and Absolute Humidity automatically from these more accurate "virtual" sensors/helpers.

The problem I have is that I cannot use the values of the helpers in the Thermal Comfort integration. It will not accept manual input of the entity id (which I tried as the dropdown would not show them) and only displays a long list of actual sensor inputs I can use.

Is there a way to be able to use helpers as input for Thermal Comfort at the moment or is that something that is not (yet) available?

With kind regards,
Thomas

@michelbalzer
Copy link

michelbalzer commented Oct 2, 2024

@thomasvnl It lets you only choose sensors with device classes temperature or humidity:

humidity_sensors = get_sensors_by_device_class(
registry, hass, SensorDeviceClass.HUMIDITY, show_advanced
)
temperature_sensors = get_sensors_by_device_class(
registry, hass, SensorDeviceClass.TEMPERATURE, show_advanced
)

Could you create a template sensor and add a device_class: temperature or device_class: humidity?

Quick OpenAi Example:

template:
  - sensor:
      - name: "Median Temperatur"
        unit_of_measurement: "°C"
        state: >
          {% set temp1 = states('sensor.temperatur_sensor_1') | float %}
          {% set temp2 = states('sensor.temperatur_sensor_2') | float %}
          {% set temps = [temp1, temp2] %}
          {{ temps | sort | median }}
        device_class: temperature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants