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 RaspyRFM switch platform #19130

Merged
merged 9 commits into from Dec 30, 2018

Conversation

Projects
None yet
3 participants
@markusressel
Copy link
Contributor

markusressel commented Dec 8, 2018

Description:

Added support for 433MHz rc devices via ConnAir/ITGW-433/RaspyRFM gateways.

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

Example entry for configuration.yaml (if applicable):

switch:
  platform: raspyrfm
  gateway_manufacturer: Seegel Systeme
  gateway_model: RaspyRFM
  host: 127.0.0.1              # Optional
  port: 49880                  # Optional
  switches:
    - name: My Switch
      controlunit_manufacturer: Intertechno
      controlunit_model: CMR 1000
      channel_config:
        master: A
        slave: 1
    - name: My other Switch
      controlunit_manufacturer: Brennenstuhl
      controlunit_model: RCS 1000 N Comfort
      channel_config:
        1: 1
        2: 1
        3: 1
        4: 1
        5: 1
        CH: A

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.

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

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

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

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

markusressel added some commits Dec 8, 2018

dont assume false state
fix default value

@markusressel markusressel referenced this pull request Dec 9, 2018

Merged

RaspyRFM platform documentation #7779

2 of 2 tasks complete
Show resolved Hide resolved homeassistant/components/switch/raspyrfm.py Outdated
Show resolved Hide resolved homeassistant/components/switch/raspyrfm.py Outdated
Show resolved Hide resolved homeassistant/components/switch/raspyrfm.py Outdated
Show resolved Hide resolved homeassistant/components/switch/raspyrfm.py Outdated
Show resolved Hide resolved homeassistant/components/switch/raspyrfm.py Outdated
Show resolved Hide resolved homeassistant/components/switch/raspyrfm.py Outdated
Show resolved Hide resolved homeassistant/components/switch/raspyrfm.py Outdated
Show resolved Hide resolved homeassistant/components/switch/raspyrfm.py Outdated
vol.Optional(CONF_NAME, default=DEVICE_DEFAULT_NAME): cv.string,
vol.Required(CONF_CONTROLUNIT_MANUFACTURER): cv.string,
vol.Required(CONF_CONTROLUNIT_MODEL): cv.string,
vol.Required(CONF_CHANNEL_CONFIG): cv.match_all,

This comment has been minimized.

@MartinHjelmare

MartinHjelmare Dec 25, 2018

Member

Don't allow any value. Everything should be validated as strict as possible.

This comment has been minimized.

@markusressel

markusressel Dec 25, 2018

Contributor

I don't think this is possible as the configuration depends on the controlunit manufacturer and model. All I can say for sure is that every channel config consists of some key value pairs but specific key names do vary. So the best I can do is cv.Dict?

This comment has been minimized.

@MartinHjelmare

MartinHjelmare Dec 27, 2018

Member

Do we know the type of the keys in the dict? Eg:

{cv.string: cv.match_all}

Try to narrow down the keys and values types of the dict as far as possible.

This comment has been minimized.

@markusressel

markusressel Dec 28, 2018

Contributor

Yes we can do that.

Show resolved Hide resolved homeassistant/components/switch/raspyrfm.py Outdated

@MartinHjelmare MartinHjelmare changed the title Added RaspyRFM component Add RaspyRFM switch platform Dec 25, 2018

markusressel added some commits Dec 25, 2018

bugfix
review fixes
@markusressel

This comment has been minimized.

Copy link
Contributor

markusressel commented Dec 28, 2018

I don't know what the current build error is coming from. I don't think it has anything to do with this PR.

@MartinHjelmare
Copy link
Member

MartinHjelmare left a comment

Looks good!

Show resolved Hide resolved homeassistant/components/switch/raspyrfm.py Outdated
@MartinHjelmare

This comment has been minimized.

Copy link
Member

MartinHjelmare commented Dec 29, 2018

Address the last comment and we can merge. The build failure is unrelated. That's a flaky test.

@MartinHjelmare MartinHjelmare merged commit 9aa6037 into home-assistant:dev Dec 30, 2018

5 checks passed

Hound No violations found. Woof!
WIP ready for review
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.1%) to 93.049%
Details

@wafflebot wafflebot bot removed the in progress label Dec 30, 2018

mxworm added a commit to mxworm/home-assistant that referenced this pull request Dec 30, 2018

Merge branch 'dev' into current
* dev: (44 commits)
  Fix ADS light when parameter adsvar_brightness is not set (home-assistant#19636)
  Bump pyHik library to 0.1.9 to improve device support. (home-assistant#19656)
  Use aioharmony for remote.harmony platform (home-assistant#19595)
  Add RaspyRFM switch platform (home-assistant#19130)
  Only bind clusters in ZHA remote entity (home-assistant#19577)
  Use async_configure for ZHA IAS binary sensor (home-assistant#19629)
  Improve Wemo setup speed (home-assistant#19563)
  Support knx operation types (home-assistant#19546)
  Use xml.etree through defusedxml (home-assistant#19640)
  Fix cpu_temp issue on Vero 4K (home-assistant#19638)
  Added events STARTED, RESTARTED AND PAUSED (home-assistant#19516)
  Revert "Bump pyotgw to 0.4b0 (home-assistant#19618)" (home-assistant#19635)
  Upgrade to async_upnp_client==0.13.8 (home-assistant#19634)
  Upgraded pyarlo to 0.2.3 (home-assistant#19626)
  Fix cpu_temp issue on Odroid (home-assistant#19620)
  Bump pyotgw to 0.4b0 (home-assistant#19618)
  Add additional neato alerts and errors (home-assistant#19608)
  LCN component and light platform (home-assistant#18621)
  Systemmonitor - add device_class property (home-assistant#19614)
  Upgrade huawei-lte-api to 1.1.1 (home-assistant#19615)
  ...

@balloob balloob referenced this pull request Jan 10, 2019

Merged

0.85.0 #19897

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment