add rest of hue driver functionality.

This commit is contained in:
2021-05-29 16:29:10 +02:00
parent 38d370894e
commit 2aa2757828
11 changed files with 1096 additions and 23 deletions
+6 -6
View File
@@ -50,12 +50,12 @@ func (b *bridge) Devices() []models.Device {
models.DCButtons,
},
ButtonNames: []string{"Touch"},
DriverProperties: map[string]string{
"x": strconv.Itoa(panel.X),
"y": strconv.Itoa(panel.Y),
"o": strconv.Itoa(panel.O),
DriverProperties: map[string]interface{}{
"x": panel.X,
"y": panel.Y,
"o": panel.O,
"shapeType": shapeTypeMap[panel.ShapeType],
"shapeWidth": strconv.Itoa(shapeWidthMap[panel.ShapeType]),
"shapeWidth": shapeWidthMap[panel.ShapeType],
},
UserProperties: nil,
State: models.DeviceState{
@@ -393,7 +393,7 @@ func (b *bridge) runTouchListener(ctx context.Context, host, apiKey string, ch c
}
event := models.Event{
Name: "ButtonPressed",
Name: models.ENButtonPressed,
Payload: map[string]string{
"buttonIndex": "0",
"buttonName": "Touch",