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

Add target temperature tile feature for climate and water heater #17697

Merged
merged 9 commits into from
Aug 29, 2023

Conversation

piitaya
Copy link
Member

@piitaya piitaya commented Aug 24, 2023

Proposed change

Add target temperature feature for climate entity. Keyboard controls are supported when the input is focused following spinbutton keyboard interactions.

Climate target temperature

CleanShot 2023-08-24 at 16 03 50

Climate target range temperature

CleanShot 2023-08-24 at 17 20 13

Water heater target temperature

CleanShot 2023-08-28 at 17 47 03

Type of change

  • Dependency upgrade
  • 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 #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • 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:

@github-actions github-actions bot added the Design Related to Home Assistant design gallery label Aug 24, 2023
@piitaya piitaya added the needs design preview PRs with this label will trigger a GitHub action to generate a gallery preview label Aug 24, 2023
@piitaya piitaya force-pushed the temperature-control-tile-feature branch from 5f90e23 to 953cdfc Compare August 24, 2023 14:42
@piitaya piitaya force-pushed the temperature-control-tile-feature branch from 31d3ed3 to 6cd85a7 Compare August 28, 2023 15:30
@piitaya piitaya changed the title Add climate target temperature tile feature Add target temperature tile feature for climate and water heater Aug 28, 2023
@piitaya piitaya force-pushed the temperature-control-tile-feature branch from a6b2803 to 7f1c8ab Compare August 28, 2023 15:51
@piitaya piitaya force-pushed the temperature-control-tile-feature branch from 7f1c8ab to 7d4fa1d Compare August 28, 2023 15:54
switch (e.code) {
case "ArrowRight":
case "ArrowUp":
this.value = this.boundedValue(this._value + this._step);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this.value = this.boundedValue(this._value + this._step);
this._increment();
return;

Comment on lines 85 to 86
this.value = this.boundedValue(this._value - this._step);
break;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this.value = this.boundedValue(this._value - this._step);
break;
this._decrement();
return;

Comment on lines 85 to 86
this.stateObj!.attributes.target_temp_step ||
(this.hass!.config.unit_system.temperature.indexOf("F") === -1 ? 0.5 : 1)
Copy link
Member

@bramkragten bramkragten Aug 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this.stateObj!.attributes.target_temp_step ||
(this.hass!.config.unit_system.temperature.indexOf("F") === -1 ? 0.5 : 1)
this.stateObj!.attributes.target_temp_step ||
(this.hass!.config.unit_system.temperature.includes("F") ? 1 : 0.5)

bramkragten
bramkragten previously approved these changes Aug 29, 2023
@bramkragten bramkragten merged commit 7040c6d into dev Aug 29, 2023
9 checks passed
@bramkragten bramkragten deleted the temperature-control-tile-feature branch August 29, 2023 14:36
@github-actions github-actions bot locked and limited conversation to collaborators Aug 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed Design Related to Home Assistant design gallery needs design preview PRs with this label will trigger a GitHub action to generate a gallery preview
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants