feat: Implement support for gesture-based PTZ control (#2378)
- Closes: #1839
This commit is contained in:
@@ -977,6 +977,25 @@ describe('should handle version specific upgrades', () => {
|
||||
});
|
||||
postUpgradeChecks(config);
|
||||
});
|
||||
|
||||
it('should not upgrade ptz settings-only config', () => {
|
||||
const config = {
|
||||
type: 'custom:advanced-camera-card',
|
||||
cameras: [{ camera_entity: 'camera.office' }],
|
||||
live: {
|
||||
controls: {
|
||||
ptz: {
|
||||
type: 'gestures',
|
||||
hide_type: true,
|
||||
mode: 'on',
|
||||
orientation: 'vertical',
|
||||
position: 'bottom-right',
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
expect(upgradeConfig(config)).toBeFalsy();
|
||||
});
|
||||
});
|
||||
|
||||
it('should move view.timeout_seconds', () => {
|
||||
|
||||
@@ -92,8 +92,10 @@ describe('config defaults', () => {
|
||||
style: 'chevrons',
|
||||
},
|
||||
ptz: {
|
||||
type: 'buttons',
|
||||
hide_home: false,
|
||||
hide_pan_tilt: false,
|
||||
hide_type: false,
|
||||
hide_zoom: false,
|
||||
mode: 'auto',
|
||||
orientation: 'horizontal',
|
||||
@@ -163,8 +165,10 @@ describe('config defaults', () => {
|
||||
style: 'thumbnails',
|
||||
},
|
||||
ptz: {
|
||||
type: 'buttons',
|
||||
hide_home: false,
|
||||
hide_pan_tilt: false,
|
||||
hide_type: false,
|
||||
hide_zoom: false,
|
||||
mode: 'off',
|
||||
orientation: 'horizontal',
|
||||
@@ -1072,7 +1076,6 @@ describe('config defaults', () => {
|
||||
{
|
||||
action: 'custom:advanced-camera-card-action',
|
||||
advanced_camera_card_action: 'ptz_controls',
|
||||
enabled: true,
|
||||
},
|
||||
{
|
||||
action: 'custom:advanced-camera-card-action',
|
||||
|
||||
Reference in New Issue
Block a user