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 config endpoint for scene #28429

Merged
merged 5 commits into from
Nov 4, 2019
Merged

Add config endpoint for scene #28429

merged 5 commits into from
Nov 4, 2019

Conversation

bramkragten
Copy link
Member

Breaking Change:

Description:

Related issue (if applicable): fixes #

Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#<home-assistant.io PR number goes here>

Example entry for configuration.yaml (if applicable):

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 user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly. Update and include derived files by running python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

@probot-home-assistant
Copy link

Hey there @home-assistant/core, mind taking a look at this pull request as its been labeled with a integration (homeassistant) you are listed as a codeowner for? Thanks!

@probot-home-assistant
Copy link

Hey there @home-assistant/core, mind taking a look at this pull request as its been labeled with a integration (config) you are listed as a codeowner for? Thanks!

@Santobert
Copy link
Member

Thats a great feature. Do I have to change something here to stay compatible? #28300

@bramkragten
Copy link
Member Author

Thats a great feature. Do I have to change something here to stay compatible? #28300

Nope, don't think so. You don't want to set an ID as we can't edit a scene that is made with scene.create

elif cur_value[CONF_ID] == config_key:
break
else:
cur_value = OrderedDict()
Copy link
Member

Choose a reason for hiding this comment

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

Dicts are ordered by default in Python 3.6+.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not getting the same result using a dict

Copy link
Member

Choose a reason for hiding this comment

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

Write a test and show us :)

Copy link
Member Author

@bramkragten bramkragten Nov 3, 2019

Choose a reason for hiding this comment

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

image

The order of the dict seems ok, but I think PyYAML can't deal with it? The YAML is not sorted correctly.

@balloob balloob merged commit e419689 into dev Nov 4, 2019
@delete-merged-branch delete-merged-branch bot deleted the config-scene branch November 4, 2019 20:38
@lock lock bot locked and limited conversation to collaborators Nov 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants