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

card_thermostat gives error when stepping temp up or down manually #1530

Open
kohlerryan opened this issue Aug 12, 2024 · 9 comments
Open

card_thermostat gives error when stepping temp up or down manually #1530

kohlerryan opened this issue Aug 12, 2024 · 9 comments
Labels

Comments

@kohlerryan
Copy link

Describe the bug
card_thermostat gives error when stepping temp up or down manually. First noticed after upgrade to HA 2024.8.1. Error message appears a bottom of screen. See screenshot for error message.

To Reproduce
Steps to reproduce the behavior:

  1. Add card_thermostat with these variables set:
  type: custom:button-card
  template: card_thermostat
  entity: climate.living_room_thermostat
  variables:
    ulm_card_thermostat_name: 'Living Room Thermostat'
    ulm_card_thermostat_enable_collapse: true
    ulm_card_thermostat_enable_controls: true
    ulm_card_thermostat_enable_hvac_modes: true
    ulm_card_thermostat_enable_background_color: true
    ulm_card_thermostat_temp_step: 1.0
  1. Click to increase or decrease temp.
  2. See error

Expected behavior
Temp should increase by defined step - or default of 1.

Screenshots

image

Additional context
I attempted to remove variable ulm_card_thermostat_temp_step:, as well as set it as 1 vs 1.0. Same result.

@andrewlelos
Copy link

I'm also having this issue!

@Misnaree
Copy link

I am also having this issue with the following error: Provided temperature -17.77777777777778 is not valid. Accepted range is 10 to 32.

@gintasb
Copy link

gintasb commented Aug 18, 2024

I've got the same issue after an update to 2024.8. Seems the issue is only with UI Minimalist.

@suarezcp87
Copy link

have the same issue

@andrewlelos
Copy link

Downgrading HA to 2024.7.4 fixed this issue for me

@pnaklicki
Copy link

Same for me, except it shows that 0.0 is not valid

@gintasb
Copy link

gintasb commented Aug 23, 2024

same here, it shows that 0.0 is not valid.

@kohlerryan
Copy link
Author

Upgraded to 2024.8.3 and have same issue.

@iganeshk
Copy link

iganeshk commented Sep 5, 2024

Found a fix, this seems to be an issue with climate's service_data. My hvac does not support

target_temp_low
target_temp_high

image

target_temp_low: |
[[[
if (entity.attributes.target_temp_low == null) {
return 0;
} else {
const unit = hass.config.unit_system.temperature
const step = variables.ulm_card_thermostat_temp_step || entity.attributes.target_temp_step || (unit == '°F' ? 1.0 : 0.5)
const new_temp = (parseFloat(entity.attributes.target_temp_high) - step)
return (new_temp - variables.ulm_card_thermostat_minimum_temp_spread < entity.attributes.target_temp_low ? new_temp - variables.ulm_card_thermostat_minimum_temp_spread : entity.attributes.target_temp_low);
}
]]]
target_temp_high: |
[[[
if (entity.attributes.target_temp_low == null) {
return 0;
} else {
const unit = hass.config.unit_system.temperature
const step = variables.ulm_card_thermostat_temp_step || entity.attributes.target_temp_step || (unit == '°F' ? 1.0 : 0.5)
return (parseFloat(entity.attributes.target_temp_high) - step)
}
]]]

target_temp_low: |
[[[
if (entity.attributes.target_temp_low == null) {
return 0;
} else {
return entity.attributes.target_temp_low;
}
]]]
target_temp_high: |
[[[
if (entity.attributes.target_temp_high == null) {
return 0;
} else {
const unit = hass.config.unit_system.temperature
const step = variables.ulm_card_thermostat_temp_step || entity.attributes.target_temp_step || (unit == '°F' ? 1.0 : 0.5)
return (parseFloat(entity.attributes.target_temp_high) + step)
}
]]]

By removing the above lines from card_thermostat.yaml the custom-cards templates under ui_minimalist (default) and of course

  • reload UI_minimalist
  • reload homepage

now am able to adjust temperature without an issue.

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

No branches or pull requests

7 participants