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

Fix climate device actions #28660

Merged

Conversation

@SukramJ
Copy link
Contributor

SukramJ commented Nov 9, 2019

Description:

A device action to set the preset_mode should only be available, if presets are used by the integration.
I used the same mechanism as used by device_condition and not the supported features flag.

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.
@project-bot project-bot bot added this to Needs review in Dev Nov 9, 2019
@SukramJ SukramJ changed the title Climate use sf for device automation Limit climate device actions Nov 9, 2019
SukramJ added 2 commits Nov 9, 2019
@SukramJ SukramJ force-pushed the SukramJ:Climate-use-SF-for-device-automation branch from d50a5f6 to cf558ee Nov 12, 2019
@SukramJ

This comment has been minimized.

Copy link
Contributor Author

SukramJ commented Nov 15, 2019

Hi @MartinHjelmare.
Maybe this PR is also something for the 0.102.x milestone.

@MartinHjelmare MartinHjelmare requested a review from balloob Nov 15, 2019
@SukramJ SukramJ changed the title Limit climate device actions Fix: Limit climate device actions Nov 18, 2019
@MartinHjelmare MartinHjelmare changed the title Fix: Limit climate device actions Fix climate device actions Nov 20, 2019
@SukramJ

This comment has been minimized.

Copy link
Contributor Author

SukramJ commented Nov 25, 2019

Hi @balloob,
i still think this is a valid PR for a minor release to limit the number of device actions to the possible ones.
BR

}
)

if state and const.ATTR_PRESET_MODES in state.attributes:

This comment has been minimized.

Copy link
@balloob

balloob Nov 25, 2019

Member

We should use the supported feature flag.

This comment has been minimized.

Copy link
@SukramJ

SukramJ Nov 25, 2019

Author Contributor

I agree, but thats the way it is implemented in device_condition.
Should i change it there too.

This comment has been minimized.

Copy link
@SukramJ

SukramJ Nov 25, 2019

Author Contributor

I modified device_condition too

SukramJ added 3 commits Nov 25, 2019
@SukramJ SukramJ requested a review from balloob Nov 25, 2019
Copy link
Member

balloob left a comment

Awesome!

Dev automation moved this from Needs review to Reviewer approved Nov 25, 2019
@balloob balloob merged commit 9a5dc84 into home-assistant:dev Nov 25, 2019
11 checks passed
11 checks passed
CI #20191125.68 succeeded
Details
CI (FullCheck Mypy) FullCheck Mypy succeeded
Details
CI (FullCheck Pylint) FullCheck Pylint succeeded
Details
CI (Overview CheckFormat) Overview CheckFormat succeeded
Details
CI (Overview Lint) Overview Lint succeeded
Details
CI (Overview Validate) Overview Validate succeeded
Details
CI (Tests PyTest Python36) Tests PyTest Python36 succeeded
Details
CI (Tests PyTest Python37) Tests PyTest Python37 succeeded
Details
cla-bot Everyone involved has signed the CLA
codecov/patch 100% of diff hit (target 94.43%)
Details
codecov/project 94.48% (target 90%)
Details
Dev automation moved this from Reviewer approved to Done Nov 25, 2019
@SukramJ SukramJ deleted the SukramJ:Climate-use-SF-for-device-automation branch Nov 25, 2019
@lock lock bot locked and limited conversation to collaborators Nov 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Done
3 participants
You can’t perform that action at this time.