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

Target humidity slider does not appear for MQTT humidifier #70

Open
ivlis opened this issue Sep 20, 2021 · 1 comment
Open

Target humidity slider does not appear for MQTT humidifier #70

ivlis opened this issue Sep 20, 2021 · 1 comment

Comments

@ivlis
Copy link

ivlis commented Sep 20, 2021

I'm trying to get an MQTT dehumidifier working with this card (https://www.home-assistant.io/integrations/humidifier.mqtt/).

After configuration, the target humidity slider won't appear on the card. My Tasmota-based no-frills dehumidifier does not have any modes, just an on/off and humidity setting.

Here is my config:

type: custom:mini-humidifier
entity: humidifier.basement_dehumidifier
power:
  type: toggle
indicators:
  humidity:
    icon: mdi:water
    unit: '%'
    source:
      entity: sensor.basement_climate_humidity
  temperature:
    source:
      entity: sensor.basement_climate_temperature
target_humidity:
  hide: 'off'
  unit: '%'
  min: 10
  max: 80
  step: 5
  attribute: humidity
  mapper: (current_value, entity, humidifier_entity) => current_value
  change_action: |
    (selected, state, entity) => {
      const options = { entity_id: entity.entity_id, humidity: selected };
      return this.call_service('humidifier', 'set_humidity', options);
    }

Here is how the card looks like:

image

HA Version: 2021.9.5

@alexschwantes
Copy link

I had the same issue using a Generic Hygrostat in HA. Your question actually helped me along the way to find a fix for it.

Essentially you need to add the following undocumented setting for it to show

target_humidity:
  disabled: false

Also, note that you have hide: 'off' when it should be hide: false

I found this setting by looking at the code here https://github.com/artem-sedykh/mini-humidifier/blob/master/src/configurations/xiaomi_miio/zhimi_humidifier_cb1.js which had a disabled setting for the target_humidity.

Also, I got it working without including the change_action setting

target_humidity:
  icon: mdi:water
  unit: '%'
  min: 30
  max: 80
  step: 10
  hide: false
  hide_indicator: false
  disabled: false
  state:
    attribute: humidity

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