Skip to content

Commit

Permalink
Explicitly set number entities UI behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
tsightler committed Aug 28, 2023
1 parent 72b2efe commit bfb880d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions devices/base-ring-device.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ export default class RingDevice {
? { min: entity.min } : {},
...entity.hasOwnProperty('max')
? { max: entity.max } : {},
...entity.hasOwnProperty('mode')
? { mode: entity.mode } : {},
...entity.hasOwnProperty('attributes')
? { json_attributes_topic: `${entityTopic}/attributes` }
: entityKey === "info"
Expand Down
1 change: 1 addition & 0 deletions devices/base-station.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default class BaseStation extends RingSocketDevice {
component: 'number',
min: 0,
max: 100,
mode: 'slider',
icon: 'hass:volume-high'
}
} else {
Expand Down
1 change: 1 addition & 0 deletions devices/beam.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export default class Beam extends RingSocketDevice {
component: 'number',
min: 0,
max: 32767,
mode: 'box',
icon: 'hass:timer'
}

Expand Down
2 changes: 2 additions & 0 deletions devices/camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ export default class Camera extends RingPolledDevice {
component: 'number',
min: 10,
max: 604800,
mode: 'box',
icon: 'hass:timer'
},
take_snapshot: {
Expand All @@ -205,6 +206,7 @@ export default class Camera extends RingPolledDevice {
component: 'number',
min: 10,
max: 180,
mode: 'box',
icon: 'hass:timer'
},
...this.device.isDoorbot ? {
Expand Down
2 changes: 2 additions & 0 deletions devices/chime.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default class Chime extends RingPolledDevice {
component: 'number',
min: 0,
max: 11,
mode: 'slider',
icon: 'hass:volume-high'
},
snooze: {
Expand All @@ -39,6 +40,7 @@ export default class Chime extends RingPolledDevice {
component: 'number',
min: 1,
max: 1440,
mode: 'box',
icon: 'hass:timer-sand'
},
play_ding_sound: {
Expand Down
1 change: 1 addition & 0 deletions devices/keypad.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default class Keypad extends RingSocketDevice {
component: 'number',
min: 0,
max: 100,
mode: 'slider',
icon: 'hass:volume-high'
},
motion: {
Expand Down
1 change: 1 addition & 0 deletions devices/siren.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export default class Siren extends RingSocketDevice {
component: 'number',
min: 0,
max: 4,
mode: 'slider',
icon: 'hass:volume-high'
}
} : {}
Expand Down

0 comments on commit bfb880d

Please sign in to comment.