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 service calls for LCN component #24105

Merged
merged 1 commit into from
May 29, 2019

Conversation

alengwenus
Copy link
Contributor

@alengwenus alengwenus commented May 25, 2019

Description:

Besides the already added LCN platforms, the LCN system offers a number of additional functions which cannot be directly represented by the platforms. In order to use these functionalities as well, this PR adds a bunch of service calls to the LCN component.

The implemented service calls are:

  • var_abs: Assign an absolute value to a hardware variable
  • var_rel: Shift the value of a hardware variable
  • var_reset: Reset the value of a hardware variable
  • led: Set lighting mode of hardware LEDs (on, off, blink, flicker)
  • lock_regulator: Lock a regulator setpoint
  • send_keys: Send hardware keys (which will execute hardware programmed commands)
  • lock_keys: Lock a hardware key (so it cannot be activated)
  • dyn_text: Send dynamic text to a LCN display
  • pck: Send an arbitrary PCK command
  • output_abs: Set absolute brightness of an output port with arbitrary transition time
  • output_rel: Set relative brightness of an output port with arbitrary transition time
  • output_toggle: Toggle an output port with arbitrary transition time
  • relays: Switch/Toggle arbitrary hardware relais

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

Example entry for configuration.yaml (if applicable):

lcn:
  connections:
    - name: myhome
      host: 192.168.2.41
      port: 4114
      username: !secret lcn_username
      password: !secret lcn_password

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.

@alengwenus alengwenus force-pushed the dev_lcn_service_calls branch from 0e365ab to 833fac7 Compare May 25, 2019 15:12
@pvizeli pvizeli requested a review from balloob May 26, 2019 12:11
@balloob
Copy link
Member

balloob commented May 29, 2019

I get a feeling here that everything has been made accessible as a service because we can. We should only make things accessible as a service if they are going to be used by users in automations.

@alengwenus
Copy link
Contributor Author

I get a feeling here that everything has been made accessible as a service because we can. We should only make things accessible as a service if they are going to be used by users in automations.

I just have directed myself to what was also implemented in the OpenHab binding. From the discussions in the forums I get the feeling that people indeed are using these functionalities. It‘s hard to say what people will use. I guess nothing‘s wrong about completeness?

@balloob balloob merged commit 50db622 into home-assistant:dev May 29, 2019
@alengwenus alengwenus deleted the dev_lcn_service_calls branch May 30, 2019 05:39
@balloob balloob mentioned this pull request Jun 4, 2019
alandtse pushed a commit to alandtse/home-assistant that referenced this pull request Oct 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants