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


