Add parameter hold_secs for Harmony remote send command (#19650)

* Update requirements

Updated requirements

* Small bump for aioharmony

Small version bump increase for aioharmony

* Add attributes

Add firmware and config version attributes

* Add hold for button press on send_command

* Fix requirements file

For some reason aioharmony ended up in there as a duplicate. Fixed it.

* Revert rebase changes

Revert some changes that should have been reverted back as part of rebase.

* Updated based on review

Removed HOLD_SECS from platform schema (configuration)
Updated getting kwargs in async_send_command
Updated debug log to include delay_secs
This commit is contained in:
ehendrix23 authored and Anders Melchiorsen committed 2019-03-03 00:54:03 +01:00
1 parent b8eebda541
commit 833f17de04
3 files changed
+15 -5

No files matched your search

@@ -23,6 +23,7 @@ ATTR_COMMAND = 'command'
ATTR_DEVICE = 'device'
ATTR_NUM_REPEATS = 'num_repeats'
ATTR_DELAY_SECS = 'delay_secs'
ATTR_HOLD_SECS = 'hold_secs'
DOMAIN = 'remote'
DEPENDENCIES = ['group']
@@ -40,6 +41,7 @@ SERVICE_SYNC = 'sync'
DEFAULT_NUM_REPEATS = 1
DEFAULT_DELAY_SECS = 0.4
DEFAULT_HOLD_SECS = 0
REMOTE_SERVICE_SCHEMA = vol.Schema({
vol.Optional(ATTR_ENTITY_ID): cv.comp_entity_ids,
@@ -55,6 +57,7 @@ REMOTE_SERVICE_SEND_COMMAND_SCHEMA = REMOTE_SERVICE_SCHEMA.extend({
vol.Optional(
ATTR_NUM_REPEATS, default=DEFAULT_NUM_REPEATS): cv.positive_int,
vol.Optional(ATTR_DELAY_SECS): vol.Coerce(float),
vol.Optional(ATTR_HOLD_SECS, default=DEFAULT_HOLD_SECS): vol.Coerce(float),
})
@@ -42,6 +42,10 @@ send_command:
delay_secs:
description: An optional value that specifies that number of seconds you want to wait in between repeated commands. If not specified, the default of 0.4 seconds will be used.
example: '0.75'
hold_secs:
description: An optional value that specifies that number of seconds you want to have it held before the release is send. If not specified, the release will be send immediately after the press.
example: '2.5'
harmony_sync:
description: Syncs the remote's configuration.