-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
410 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
type: object | ||
properties: | ||
timeslots: | ||
type: array | ||
items: | ||
$ref: './SmartSceneTimeslotGet.yaml' | ||
recurrence: | ||
type: array | ||
items: | ||
$ref: './Weekday.yaml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
type: object | ||
allOf: | ||
- $ref: '../../common/Resource.yaml' | ||
- type: object | ||
properties: | ||
type: | ||
type: string | ||
enum: | ||
- smart_scene | ||
metadata: | ||
$ref: './SmartSceneMetadata.yaml' | ||
group: | ||
$ref: '../../common/ResourceIdentifier.yaml' | ||
week_timeslots: | ||
description: information on what is the light state for every timeslot of the day | ||
type: array | ||
items: | ||
$ref: './DayTimeslotsGet.yaml' | ||
transition_duration: | ||
description: duration of the transition from on one timeslot's scene to the other (defaults to 60000ms) | ||
type: integer | ||
active_timeslot: | ||
description: the active time slot in execution | ||
type: object | ||
properties: | ||
timeslot_id: | ||
type: integer | ||
weekday: | ||
$ref: './Weekday.yaml' | ||
required: | ||
- timeslot_id | ||
- weekday | ||
state: | ||
description: the current state of the smart scene. The default state is inactive if no recall is provided | ||
type: string | ||
enum: | ||
- active | ||
- inactive | ||
required: | ||
- type | ||
- metadata | ||
- week_timeslots | ||
- transition_duration | ||
- state |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
minLength: 1 | ||
maxLength: 32 | ||
description: Human readable name of a resource | ||
image: | ||
$ref: '../../common/ResourceIdentifier.yaml' | ||
appdata: | ||
type: string | ||
minLength: 1 | ||
maxLength: 16 | ||
description: Application specific data. Free format string. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
type: object | ||
properties: | ||
type: | ||
type: string | ||
enum: | ||
- smart_scene | ||
metadata: | ||
$ref: './SmartSceneMetadata.yaml' | ||
group: | ||
$ref: '../../common/ResourceIdentifier.yaml' | ||
week_timeslots: | ||
description: information on what is the light state for every timeslot of the day | ||
type: array | ||
items: | ||
$ref: './DayTimeslotsGet.yaml' | ||
transition_duration: | ||
description: duration of the transition from on one timeslot's scene to the other (defaults to 60000ms) | ||
type: integer | ||
recall: | ||
$ref: './SmartSceneRecall.yaml' | ||
required: | ||
- metadata | ||
- group | ||
- week_timeslots |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
type: object | ||
properties: | ||
type: | ||
type: string | ||
enum: | ||
- smart_scene | ||
metadata: | ||
$ref: './SmartSceneMetadata.yaml' | ||
group: | ||
$ref: '../../common/ResourceIdentifier.yaml' | ||
week_timeslots: | ||
description: information on what is the light state for every timeslot of the day | ||
type: array | ||
items: | ||
$ref: './DayTimeslotsGet.yaml' | ||
transition_duration: | ||
description: duration of the transition from on one timeslot's scene to the other (defaults to 60000ms) | ||
type: integer | ||
recall: | ||
$ref: './SmartSceneRecall.yaml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
type: object | ||
properties: | ||
action: | ||
type: string | ||
description: Activate will start the smart (24h) scene; deactivate will stop it | ||
enum: | ||
- activate | ||
- deactivate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
type: object | ||
properties: | ||
start_time: | ||
type: object | ||
properties: | ||
kind: | ||
type: string | ||
enum: | ||
- time | ||
- sunset | ||
time: | ||
type: object | ||
description: this property is only used when property “kind” is “time” | ||
properties: | ||
hour: | ||
type: integer | ||
minimum: 0 | ||
maximum: 23 | ||
minute: | ||
type: integer | ||
minimum: 0 | ||
maximum: 59 | ||
second: | ||
type: integer | ||
minimum: 0 | ||
maximum: 59 | ||
required: | ||
- kind | ||
target: | ||
$ref: '../../common/ResourceIdentifier.yaml' | ||
required: | ||
- start_time | ||
- target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
type: string | ||
enum: | ||
- monday | ||
- tuesday | ||
- wednesday | ||
- thursday | ||
- friday | ||
- saturday | ||
- sunday |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
get: | ||
operationId: getSmartScenes | ||
summary: List smart scenes | ||
description: List all available smart scenes | ||
tags: | ||
- Smart Scene | ||
security: | ||
- HueApplicationKey: [ ] | ||
responses: | ||
'200': | ||
description: Smart Scene Success Response | ||
content: | ||
application/json: | ||
schema: | ||
allOf: | ||
- $ref: '../common/ApiResponse.yaml' | ||
- type: object | ||
properties: | ||
data: | ||
type: array | ||
items: | ||
$ref: './schemas/SmartSceneGet.yaml' | ||
401: | ||
$ref: '../common/error.yaml#/components/responses/Unauthorized' | ||
403: | ||
$ref: '../common/error.yaml#/components/responses/Forbidden' | ||
404: | ||
$ref: '../common/error.yaml#/components/responses/NotFound' | ||
405: | ||
$ref: '../common/error.yaml#/components/responses/MethodNotAllowed' | ||
406: | ||
$ref: '../common/error.yaml#/components/responses/NotAcceptable' | ||
409: | ||
$ref: '../common/error.yaml#/components/responses/Conflict' | ||
429: | ||
$ref: '../common/error.yaml#/components/responses/TooManyRequests' | ||
500: | ||
$ref: '../common/error.yaml#/components/responses/InternalServerError' | ||
503: | ||
$ref: '../common/error.yaml#/components/responses/ServiceUnavailable' | ||
507: | ||
$ref: '../common/error.yaml#/components/responses/InsufficientStorage' | ||
post: | ||
operationId: createSmartScene | ||
summary: Create a new smart scene | ||
description: Creates a new smart scene | ||
tags: | ||
- Smart Scene | ||
security: | ||
- HueApplicationKey: [ ] | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: './schemas/SmartScenePost.yaml' | ||
responses: | ||
'200': | ||
description: Success | ||
content: | ||
application/json: | ||
schema: | ||
allOf: | ||
- $ref: '../common/ApiResponse.yaml' | ||
- type: object | ||
properties: | ||
data: | ||
type: array | ||
items: | ||
$ref: '../common/ResourceIdentifier.yaml' | ||
401: | ||
$ref: '../common/error.yaml#/components/responses/Unauthorized' | ||
403: | ||
$ref: '../common/error.yaml#/components/responses/Forbidden' | ||
404: | ||
$ref: '../common/error.yaml#/components/responses/NotFound' | ||
405: | ||
$ref: '../common/error.yaml#/components/responses/MethodNotAllowed' | ||
406: | ||
$ref: '../common/error.yaml#/components/responses/NotAcceptable' | ||
409: | ||
$ref: '../common/error.yaml#/components/responses/Conflict' | ||
429: | ||
$ref: '../common/error.yaml#/components/responses/TooManyRequests' | ||
500: | ||
$ref: '../common/error.yaml#/components/responses/InternalServerError' | ||
503: | ||
$ref: '../common/error.yaml#/components/responses/ServiceUnavailable' | ||
507: | ||
$ref: '../common/error.yaml#/components/responses/InsufficientStorage' |
Oops, something went wrong.