Help required with Edge driver profile syntax

Some time ago I wrote an Edge driver for a Secure SIR321 switch with temperature measurement capability.

It work just fine, but I thought it would be nice to include the current water temperature on the dashboard.
Having done something similar for my Secure SRT thermostats some time ago I have spent all day trying without success. I have either wiped out all the details of both dashboard or detailView or, more often gotten an unintelligible error from ‘smartthings edge:devices:package’.
Does anybody have a YaML syntax definition (LL(1), or even LR(1)) for Edge device profile?

Here is my attempt at a profile (alas the paste has butchered it).

name: secure_sir
components:

id: main
capabilities:

id: switch
version: 1

id: refresh
version: 1
categories:

name: Switch

id: WaterTemperature
capabilities:

id: temperatureMeasurement
version: 1
categories:

name: GenericSensor
deviceConfig:
dashboard:
states:

component: main
capability: switch
version: 1
values:

key: switch.value
enabledValues:

‘on’

component: main
capability: temperatureMeasurement
version: 1
actions:

component: main
capability: switch
version: 1
values:

key: switch.value
enabledValues:

‘on’
basicPlus:

component: main
capability: temperatureMeasurement
version: 1
detailView:

component: main
capability: switch
version: 1
values:

key: switch.value
enabledValues:

‘on’

component: main
capability: temperatureMeasurement
version: 1

component: main
capability: refresh
version: 1
automation:
conditions:

component: main
capability: switch
version: 1
values:

key: switch.value
enabledValues:

‘on’
preferences:

name: “reportingInterval”
title: “reporting Interval”
description: “Temperature reporting interval”
required: true
preferenceType: number
definition:
minimum: 60
maximum: 3660
default: 300

name: “deltaT”
title: “Temperature reporting delta”
required: true
preferenceType: number
definition:
minimum: 2
maximum: 20
default: 5

name: “temperatureCutoff”
title: “Temperature Cutoff”
required: true
preferenceType: number
definition:
minimum: 0
maximum: 1000
default: 0

Remember this thread?

deviceConfig, dashboard, states, …

>> Remember this thread?

I remember it, but do you think I could find it? I spent an hour looking for it.
I also remember how much you helped. Thanks again.

1 Like

Well, I have made some progress.
No more package errors, and the detailView is working as before but dashboard view is still missing temperature. Here is the dashboard bit in case it rings any bells:

dashboard:

states:

- component: main

  capability: switch

  version: 1

  group: main

  composite: true

- component: main

  capability: temperatureMeasurement

  version: 1

  group: main

  composite: true

actions:

- component: main

  capability: switch

  version: 1

- component: main

  capability: temperatureMeasurement

  version: 1

basicPlus:

- component: main

  capability: temperatureMeasurement

  version: 1

It’s 1 am here… Try this:

deviceConfig:
  dashboard:
    states:
      - component: main
        capability: switch
        version: 1
        group: main
        composite: true
      - component: main
        capability: temperatureMeasurement
        version: 1
        group: main
        values:
          - label: "{{temperature.value}}"
        composite: true
    actions:
      - component: main
        capability: switch
        version: 1
        group: main
        composite: true
    basicPlus: []

Only one action, of course, because that’s the button in the upper right corner of the tile. basicPlus is empty.

1 Like

Thanks again @Andreas_Roedl

I had made so many errors; the biggest of which was that I omitted ‘deviceConfig:’.
I finally got it working.
Cheers, Aidan

1 Like