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

Refactor device components #42

Merged
merged 7 commits into from
Mar 1, 2015
Merged

Conversation

balloob
Copy link
Member

@balloob balloob commented Mar 1, 2015

Adds a common base for the four components that handle devices: thermostat, light, switch, sensor.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 3b7b34b on chore-refactor-device-components into * on dev*.

@theolind
Copy link
Contributor

theolind commented Mar 1, 2015

I have tested it with my custom switch platform. It works well, I only had to change a few lines of code to get it working (switch device_discovery with setup_platform and have the devices added by the callback function).

@balloob balloob force-pushed the chore-refactor-device-components branch from fb70dff to 0004700 Compare March 1, 2015 19:04
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 53.72% when pulling 0004700 on chore-refactor-device-components into 508a433 on dev.

@balloob
Copy link
Member Author

balloob commented Mar 1, 2015

Just added some code that makes it backwards compatible and issue a warning that you should update the component:

WARNING:homeassistant.components.thermostat:Please upgrade thermostat.old_demo to return new devices using setup_platform. See thermostat/demo.py for an example.

balloob added a commit that referenced this pull request Mar 1, 2015
@balloob balloob merged commit 2727fd1 into dev Mar 1, 2015
@balloob balloob deleted the chore-refactor-device-components branch March 1, 2015 19:13
@home-assistant home-assistant locked and limited conversation to collaborators Mar 17, 2017
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.

3 participants