Skip to content

Add config endpoint for scene#28429

Merged
balloob merged 5 commits into
devfrom
config-scene
Nov 4, 2019
Merged

Add config endpoint for scene#28429
balloob merged 5 commits into
devfrom
config-scene

Conversation

@bramkragten
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown

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
Copy Markdown
Member

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

@bramkragten
Copy link
Copy Markdown
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

Comment thread homeassistant/components/homeassistant/scene.py
Comment thread homeassistant/config.py
elif cur_value[CONF_ID] == config_key:
break
else:
cur_value = OrderedDict()
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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