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

Duration parameter for warmup.set_override service #18

Open
artmg opened this issue Jan 15, 2020 · 0 comments
Open

Duration parameter for warmup.set_override service #18

artmg opened this issue Jan 15, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@artmg
Copy link
Collaborator

artmg commented Jan 15, 2020

If a user was going to create a button or an automation to set an override, they would probably not use a fixed end time, but specify a duration instead.

This enhancement request is to allow an additional optional parameter to specify a duration when calling the service warmup.set_override. I propose the definition:

set_override:
  fields:
    duration:
      description: An optional duration for the override, in minutes, as an alternative to specifying until
      example: 120

Implementation note. Although the warmup4ie.py method set_override is defined with an until parameter, and the API request (type 3) specifies the until value only, it is highly likely that the API also includes other override request types that use duration because a) the properties include a value override_duration_mins and b) the server response returns the duration rather than the until.

2020-01-15 11:48:31 INFO (SyncWorker_0) [custom_components.warmup.warmup4ie.warmup4ie] Successfully set override, response from server: 
'{"status":{"result":"success"},"message":{"setOverrideByRoomId":{"query2":{"query":"mutation {deviceOverride(lid:54321,rid:12345,temperature:210,minutes:11)}"},
"result2":{"data":{"deviceOverride":true},"status":"success"}},"setOverride":{"overrideDur":"11"},"duration":"0.125"}}'
@artmg artmg added the enhancement New feature or request label Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant