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 mysensors IR switch device and service #2239

Merged
merged 2 commits into from
Jun 12, 2016

Conversation

MartinHjelmare
Copy link
Member

@MartinHjelmare MartinHjelmare commented Jun 5, 2016

Description:
This PR makes it possible to change an IR code for a MySensors IR sender device and turn that on to send the code. After turning on to send the code the device should be turned off.

  • Add MySensorsIRSwitch as child class to MySensorsSwitch.
  • Add platform specific service mysensors_send_ir_code. Only call
    device method in service function if device is IR device.
  • Add service and required attribute to state helper to support scenes.
  • Move V_IR_SEND type from sensor.mysensors to switch.mysensors
    platform.
  • Populate switch.services.yaml with service descriptions.

Pull request in home-assistant.io with documentation (if applicable):
home-assistant/home-assistant.io#556

Checklist:

If user exposed functionality or configuration variables are added/changed:

If code communicates with devices:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass

@balloob
Copy link
Member

balloob commented Jun 9, 2016

So this looks fine, I don't see anything from looking at the code that this would not work 🐬

You can merge it if you think it's ready.

* Add MySensorsIRSwitch as child class to MySensorsSwitch.
* Add platform specific service mysensors_send_ir_code. Only call
	device method in service function if device is IR device.
* Add service and required attribute to state helper to support scenes.
* Move V_IR_SEND type from sensor.mysensors to switch.mysensors
	platform.
* Populate switch.services.yaml with service descriptions.
Since multiple entity_ids can be passed as service data, and the
entity_id service attribute is forced to a list by the service
validation schema, the check in the service function should iterate
over any entity ids.
@MartinHjelmare
Copy link
Member Author

Fixed the check of entity_id in service function. Docs added. Merging.

@MartinHjelmare MartinHjelmare merged commit 81ca175 into home-assistant:dev Jun 12, 2016
@MartinHjelmare MartinHjelmare deleted the mysensors-ir branch June 12, 2016 21:04
@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.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants