frontend
frontend copied to clipboard
Prevent service call error if preset_mode is null
Breaking change
Proposed change
On the more-info-climate dialog, the preset_mode value can be null. However, if it is null, it calls the set_preset_mode service with the preset_mode as null and causes an error.
Failed to call service climate/set_preset_mode. String value is None for dictionary value @ data['preset_mode']
This minor change amends _handlePresetmodeChanged to prevent calling of the service is the preset_mode is null.
Type of change
- [ ] Dependency upgrade
- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (thank you!)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
Example configuration
Additional information
- This PR fixes or closes issue: fixes #13801
- This PR is related to issue or discussion:
- Link to documentation pull request:
Checklist
- [x] The code change is tested and works locally.
- [x] There is no commented out code in this PR.
- [ ] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for www.home-assistant.io