Closed agav85 closed 1 year ago
Please share full card configuration, otherwise I can't help
Thanks for prompt response!
- type: custom:mini-humidifier
entity: humidifier.deerma_jsq2w_415f_humidifier
model: 'deerma.humidifier.jsq2w'
power:
type: toggle
indicators:
humidity:
icon: mdi:water
unit: '%'
source:
entity: sensor.home_humidity
temperature:
icon: mdi:thermometer
unit: '°C'
source:
entity: sensor.home_temperature
tankfilled:
source:
entity: binary_sensor.deerma_jsq5_415f_the_tank_filed
tankempty:
source:
entity: binary_sensor.deerma_jsq5_415f_water_shortage_fault
alarm:
source:
entity: switch.deerma_jsq2w_415f_alarm
target_humidity:
icon: 'mdi:water'
state:
attribute: target_humidity
unit: '%'
hide: false
disabled: false
min: 40
max: 70
step: 1
Can you please share your entity attributes as well? Something like:
I suspect that the current value is outside of the range you set up of [40,70]
Also you did not set the change_action attribute which is a must, otherwise any changes to the sliders do nothing
I have corrected the range setup as per spec:
And added change_action attribute:
- type: custom:mini-humidifier
entity: humidifier.deerma_jsq2w_415f_humidifier
model: 'deerma.humidifier.jsq2w'
power:
type: toggle
indicators:
humidity:
icon: mdi:water
unit: '%'
source:
entity: sensor.home_humidity
temperature:
icon: mdi:thermometer
unit: '°C'
source:
entity: sensor.home_temperature
tankfilled:
source:
entity: binary_sensor.deerma_jsq5_415f_the_tank_filed
tankempty:
source:
entity: binary_sensor.deerma_jsq5_415f_water_shortage_fault
alarm:
source:
entity: switch.deerma_jsq2w_415f_alarm
target_humidity:
icon: 'mdi:water'
state:
attribute: target_humidity
unit: '%'
hide: false
disabled: false
min: 40
max: 80
step: 1
change_action: >
(selected, state, entity) => {
const options = { entity_id: entity.entity_id, humidity: selected };
return this.call_service('humidifier', 'set_humidity', options);
}
But the behavior is still the same :(
And the value I set with the slider is in the specified range. As I mentioned earlier, nevertheless the slider goes to 0 (minimum) value after setting it, this target value is written. It can be confirmed through Mihome app. It changes there. But the slider doesn't show the current value.
One more thing - the default card, suggested by HA through the Add to dashboard menu, works fine. But I like custom card better!
you don't have an attribute in the entity called target_humidtiy
you need to change in your config to humidity
....
Thank you for your time! It worked this way. Sorry for that. Here is the final config:
- type: custom:mini-humidifier
entity: humidifier.deerma_jsq2w_415f_humidifier
model: 'deerma.humidifier.jsq2w'
power:
type: toggle
indicators:
humidity:
icon: mdi:water
unit: '%'
source:
entity: sensor.home_humidity
temperature:
icon: mdi:thermometer
unit: '°C'
source:
entity: sensor.home_temperature
target_humidity:
icon: 'mdi:water'
state:
attribute: humidity
unit: '%'
hide: false
disabled: false
min: 40
max: 80
step: 1
change_action: >
(selected, state, entity) => {
const options = { entity_id: entity.entity_id, humidity: selected };
return this.call_service('humidifier', 'set_humidity', options);
}
I have a problem with slider - it is not showing set target humidity but returns back to minimum (default) value after sliding to the target value. Though the target humidity is set well. Slider just does not show the set value.