Hi,
I created a custom capability and it works fine from the detailed view.
However, I’m unable to use it in automation action, I get “Network error” when trying to save the routine.
Please see below the capability and presentation.
Any ideas would be greatly appreciated.
Yakov
Capability.yml
id: amberpiano10217.powerOnState
version: 1
name: Power On State
attributes:
powerOnState:
schema:
type: object
properties:
value:
type: string
enum:
- on
- off
- togge_previous
- set_previous
additionalProperties: false
required:
- value
enumCommands: []
setter: setSate
supportedPowerOnStates:
schema:
type: object
properties:
value:
type: array
items:
type: string
enum:
- on
- off
- togge_previous
- set_previous
additionalProperties: false
required: []
enumCommands: []
commands:
setSate:
name: setSate
arguments:
- name: value
optional: false
schema:
type: string
enum:
- on
- off
- togge_previous
- set_previous
ocfResourceType: oic.d.switch
Presentation.yml
dashboard:
states:
- label: '{{powerOnState.value}}'
alternatives:
- key: on
value: Initial state ON
- key: off
value: Initial state OFF
- key: togge_previous
value: Initial state LAST
- key: set_previous
value: Initial state Unknown
actions: []
basicPlus: []
detailView:
- label: 'PowerON State'
displayType: list
list:
command:
name: setSate
alternatives:
- key: on
value: ON
- key: off
value: OFF
- key: togge_previous
value: LAST
- key: set_previous
value: Previous
supportedValues: supportedPowerOnStates.value
state:
value: powerOnState.value
alternatives:
- key: on
value: Always ON
- key: off
value: Always OFF
- key: togge_previous
value: LAST
- key: set_previous
value: PREV
automation:
conditions: []
actions:
- label: 'PowerON State'
displayType: list
list:
alternatives:
- key: on
value: Initial state ON
- key: off
value: Initial state OFF
- key: togge_previous
value: Initial state LAST
- key: set_previous
value: Initial state PREVIOUS
supportedValues: supportedPowerOnStates.value
id: amberpiano10217.powerOnState
version: 1