Skip to content

Commit

Permalink
some small renamings
Browse files Browse the repository at this point in the history
  • Loading branch information
splattner committed May 3, 2024
1 parent 68222aa commit b2b4f26
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 43 deletions.
8 changes: 4 additions & 4 deletions pkg/entities/button.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package entities

type ButtonEntityState string
type ButtonEntityFeatures string
type ButtonEntityAttribute string
type ButtonEntityCommand string
type ButtonEntityState EntityState
type ButtonEntityFeatures EntityFeature
type ButtonEntityAttribute EntityAttribute
type ButtonEntityCommand EntityCommand

const (
AvailableButtonEntityState EntityState = "AVAILABLE"
Expand Down
8 changes: 4 additions & 4 deletions pkg/entities/climate.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package entities

type ClimateEntityState string
type ClimateEntityFeatures string
type ClimateEntityAttributes string
type ClimateEntityCommand string
type ClimateEntityState EntityState
type ClimateEntityFeatures EntityFeature
type ClimateEntityAttributes EntityAttribute
type ClimateEntityCommand EntityCommand

const (
OffClimateEntityState ClimateEntityState = "OFF"
Expand Down
8 changes: 4 additions & 4 deletions pkg/entities/cover.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package entities

type CoverEntityState string
type CoverEntityFeatures string
type CoverEntityAttributes string
type CoverEntityCommand string
type CoverEntityState EntityState
type CoverEntityFeatures EntityFeature
type CoverEntityAttributes EntityAttribute
type CoverEntityCommand EntityCommand

const (
OpeningCoverEntityState CoverEntityState = "OPENING"
Expand Down
4 changes: 4 additions & 0 deletions pkg/entities/entities.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ import (
)

type EntityState string
type EntityCommand string
type EntityAttribute string
type EntityFeature string
type EntityOption string

const (
UnavailableEntityState EntityState = "UNAVAILABLE"
Expand Down
8 changes: 4 additions & 4 deletions pkg/entities/light.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
log "github.com/sirupsen/logrus"
)

type LightEntityState string
type LightEntityFeatures string
type LightEntityAttributes string
type LightEntityCommand string
type LightEntityState EntityState
type LightEntityFeatures EntityFeature
type LightEntityAttributes EntityAttribute
type LightEntityCommand EntityCommand

const (
OnLightEntityState LightEntityState = "ON"
Expand Down
10 changes: 5 additions & 5 deletions pkg/entities/media_player.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package entities

import "slices"

type MediaPlayerEntityState string
type MediaPlayerEntityFeatures string
type MediaPlayerEntityAttributes string
type MediaPlayerEntityCommand string
type MediaPlayerEntityOption string
type MediaPlayerEntityState EntityState
type MediaPlayerEntityFeatures EntityFeature
type MediaPlayerEntityAttributes EntityAttribute
type MediaPlayerEntityCommand EntityCommand
type MediaPlayerEntityOption EntityOption
type MediaPlayerDeviceClass string

const (
Expand Down
10 changes: 5 additions & 5 deletions pkg/entities/remote.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package entities

type RemoteEntityState string
type RemoteEntityFeatures string
type RemoteEntityAttributes string
type RemoteEntityCommand string
type RemoteEntityOption string
type RemoteEntityState EntityState
type RemoteEntityFeatures EntityFeature
type RemoteEntityAttributes EntityAttribute
type RemoteEntityCommand EntityCommand
type RemoteEntityOption EntityOption

const (
OnRemoteEntityState RemoteEntityState = "ON"
Expand Down
8 changes: 4 additions & 4 deletions pkg/entities/sensor.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package entities

type SensorEntityState string
type SensorEntityFeatures string
type SensorEntityAttributes string
type SensorEntityCommand string
type SensorEntityState EntityState
type SensorEntityFeatures EntityFeature
type SensorEntityAttributes EntityAttribute
type SensorEntityCommand EntityCommand
type SensorDeviceClass string

const (
Expand Down
8 changes: 4 additions & 4 deletions pkg/entities/switch.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package entities

type SwitchEntityState string
type SwitchEntityFeatures string
type SwitchEntityAttributes string
type SwitchEntityCommand string
type SwitchEntityState EntityState
type SwitchEntityFeatures EntityFeature
type SwitchEntityAttributes EntityAttribute
type SwitchEntityCommand EntityCommand

const (
OnSwitchtEntityState SwitchEntityState = "ON"
Expand Down
18 changes: 9 additions & 9 deletions pkg/integration/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,13 +363,13 @@ type RequireUserAction struct {
Confirmation interface{} `json:"confirmation,omitempty"`
}

type RemoteButtonMapping struct {
Button string `json:"string"`
ShortPress RemoteCommand `json:"short_press,omitempty"`
LongPress RemoteCommand `json:"long_press,omitempty"`
type ButtonMapping struct {
Button string `json:"string"`
ShortPress Command `json:"short_press,omitempty"`
LongPress Command `json:"long_press,omitempty"`
}

type RemoteCommand struct {
type Command struct {
CmdId string `json:"cmd_id"`
Params map[string]string `json:"params,omitempty"`
}
Expand All @@ -389,10 +389,10 @@ type UserInterfacePage struct {
}

type UserInterfaceItem struct {
Type string `json:"type"`
Icon string `json:"icon"`
Text string `json:"text"`
Command RemoteCommand `json:"command"`
Type string `json:"type"`
Icon string `json:"icon"`
Text string `json:"text"`
Command Command `json:"command"`
Location struct {
X int `json:"x"`
Y int `json:"y"`
Expand Down

0 comments on commit b2b4f26

Please sign in to comment.