@ledvance/base 1.3.101 → 1.3.102

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "@ledvance/base",
5
5
  "pid": [],
6
6
  "uiid": "",
7
- "version": "1.3.101",
7
+ "version": "1.3.102",
8
8
  "scripts": {
9
9
  "prepublishOnly": "python update-localazy.py"
10
10
  },
package/src/api/native.ts CHANGED
@@ -2,6 +2,7 @@ import {NativeModules, Platform} from 'react-native'
2
2
  import {NativeResult, Result} from '../models/modules/Result'
3
3
  import {DpSchema, TYSdk} from 'tuya-panel-kit'
4
4
  import {RoutineParam} from "../utils/interface";
5
+ import {xLog} from '@utils'
5
6
  interface LDVDevicePanelManager {
6
7
  back: () => void
7
8
  control: (params: any, callback: (result: any) => void) => void
@@ -27,6 +28,7 @@ interface LDVDevicePanelManager {
27
28
  getMicrophoneAccess: (res:any) => Promise<Result<any>>
28
29
  firebaseEvent: (dimensions:Record<any, any>) => Promise<NativeResult<any>>
29
30
  appEvent: (action: string, payload: Record<string, any>) => void
31
+ getRoutinesFirstName: (params: Record<any, any>) => Promise<NativeResult<any>>
30
32
  }
31
33
 
32
34
  export enum UADeviceCategory {
@@ -376,6 +378,22 @@ export class NativeApi {
376
378
  msg: nativeResult.msg,
377
379
  }
378
380
  }
381
+
382
+ static async getRoutinesFirstName(devId: string, routineParams: Record<any, any>[]): Promise<string[]>{
383
+ try {
384
+ const nativeResult = await devicePanel.getRoutinesFirstName({
385
+ devId,
386
+ params: JSON.stringify(routineParams)
387
+ })
388
+ if (!nativeResult.result) {
389
+ return routineParams.map(() => '')
390
+ }
391
+ return JSON.parse(nativeResult.data)
392
+ } catch (e) {
393
+ xLog('getRoutinesFirstName error', e)
394
+ return routineParams.map(() => '')
395
+ }
396
+ }
379
397
  }
380
398
 
381
399
  // 打开下载文件
@@ -74,6 +74,7 @@ const getStyles = (theme: ThemeType | undefined) => StyleSheet.create({
74
74
  backgroundColor: theme?.global.background
75
75
  },
76
76
  content: {
77
+ paddingVertical: cx(16),
77
78
  color: theme?.global.fontColor,
78
79
  fontSize: cx(14)
79
80
  }
@@ -34988,12 +34988,12 @@ export default {
34988
34988
  "hybrid_switchstate_setting3_description": "开关按钮",
34989
34989
  "hybrid_switchstate_setting_text": "开关状态设置",
34990
34990
  "hybrid_switchstate_title": "开关状态",
34991
- "infobutton_fixedtimecycle": "Fixed Time Cycle lets your SMART+ device turn ON and OFF repeatedly at the interval you choose.**\nSet a cycle duration, and the SMART+ device will switch automatically until you stop it.\n\nWith Fixed Time Cycle you can:\n\n* Define ON and OFF duration (e.g., 5 min ON / 10 min OFF)\n* Run repeated cycles automatically\n* Pause or stop the cycle anytime\n\n**Tip:** Ideal for devices that need regular intervals of power.",
34991
+ "infobutton_fixedtimecycle": "定时计划功能可让您的SMART+设备按设定间隔反复开关。**\n设定循环时长后,设备将自动切换状态直至您手动停止。\n\n定时计划可实现:\n\n* 定义开关机时长(例如:开机5分钟/关机10分钟)\n* 自动执行循环操作\n* 随时暂停或终止循环\n\n**提示:**特别适用于需要定时供电的设备。",
34992
34992
  "infobutton_history": "历史记录功能可追溯设备过去7天内所有手动开关操作。\n精准显示设备启闭时间,助您掌握近期使用动态。\n\n功能亮点:\n\n* 查看上周所有手动开关记录\n* 监测设备使用频率\n* 及时发现异常活动\n\n**注意:**\n历史记录仅记录手动操作,且仅覆盖最近7天数据。",
34993
- "infobutton_poweronbehavior": "Power On Behavior lets you decide how your device reacts when it receives power.\nAfter a power outage or when plugged in, the device can automatically switch ON, remain OFF, or return to the state it had before losing power.\n\nWhat you can do:\n\n* Choose **Always ON** to power the device immediately\n* Choose **Always OFF** to keep it off when powered\n* Choose **Last State** to restore the previous ON/OFF state\n* Adjust the setting for each device individually\n\n**Note:**\nThis ensures your devices behave predictably after power interruptions and helps avoid unwanted switching.",
34994
- "infobutton_randomtimecycle": "Random Time Cycle turns your SMART+ devices ON and OFF at unpredictable intervals within a time range you choose.\nThis creates natural, non-repetitive behavior.\n\nWith Random Time Cycle you can:\n\n* Set a time range for random switching\n* Let the plug turn ON/OFF unpredictably\n* Make your home look occupied when you’re away\n\n**Tip:** Great for lights to simulate presence.",
34995
- "infobutton_timer": "The Timer feature switches your device ON or OFF after a countdown you set.\nChoose how long the timer runs, and once the time is up, the device will act automatically.\n\nWhat you can do:\n\n* Set a one-time countdown (minutes or hours)\n* Trigger an automatic ON or OFF action\n* Use it for temporary automation without creating schedules\n* Cancel or change the countdown at any time\n\n**Note:**\nThe timer works once and does not repeat unless you set it again.",
34996
- "infobutton_timeschedule": "Time Schedule lets you automate your device by setting specific ON and OFF times.\nCreate daily or weekly routines so your SMART+ devices work automatically—no manual control needed.\n\nWith Time Schedule you can:\n\n* Turn devices ON/OFF at chosen times\n* Create multiple schedules for different days\n* Set repeating routines (e.g., weekdays, weekends)\n* Manage all scheduled actions in one place\n\n**Tip:** Make sure your device stays connected so schedules run reliably.\n\nWhat you can do:\n\n* Set one-time or repeating schedules\n* Choose specific days of the week\n* Quickly create new entries with “ON/OFF suggestions”\n* View all schedules in a single timeline\n* Temporarily disable schedules without deleting them",
34993
+ "infobutton_poweronbehavior": "通电行为可自定义设备通电时的响应模式:\n断电后或插电时,设备可自动开启、保持关闭,或恢复至断电前的状态。\n\n操作选项:\n\n* 选择**始终开启**:设备即刻通电\n* 选择**始终关闭**:通电后保持关机状态\n* 选择**恢复上次状态**:还原先前开/关状态\n* 可为每台设备单独调整设置\n\n**注意:**\n此功能确保设备在断电后行为可预测,避免意外切换。",
34994
+ "infobutton_randomtimecycle": "随机定时计划可在您设定的时段内,以不可预测的间隔自动开启/关闭 SMART+ 设备。\n此功能可营造自然且不重复的运行模式。\n\n随机定时计划支持:\n\n* 设定随机开关时段\n* 实现插座不可预测的开关状态\n* 离家时模拟家中有人状态\n\n**小贴士:**特别适用于模拟人居状态的照明场景。",
34995
+ "infobutton_timer": "定时器功能可在设定倒计时结束后自动开启或关闭设备。\n设定计时长度,时间结束后设备将自动执行操作。\n\n功能说明:\n\n* 设置单次倒计时(分钟或小时)\n* 触发自动开关机操作\n* 无需创建计划即可实现临时自动化\n* 可随时取消或修改倒计时\n\n**注意:**\n计时器仅执行一次,除非重新设置否则不会重复。",
34996
+ "infobutton_timeschedule": "定时计划功能可通过设定特定开关时间实现设备自动化。\n创建每日或每周例行任务,让您的SMART+设备自动运行——无需手动控制。\n\n定时计划功能支持:\n\n* 在指定时间开启/关闭设备\n* 为不同日期创建多重计划\n* 设置循环例程(如工作日/周末)\n* 集中管理所有计划任务\n\n**提示:**请确保设备保持联网状态,以保障计划可靠运行。\n\n功能亮点:\n\n* 设置单次或循环计划\n* 选择特定星期几\n* 通过\"开关建议\"快速创建新条目\n* 在单一时间轴查看所有计划\n* 临时禁用计划而不删除",
34997
34997
  "infobutton_totalenergy": "总能量仅显示上次重置后的总消耗/生成数据。\n数据在以下日期切换:",
34998
34998
  "intermittent_time": "间歇时间",
34999
34999
  "internet_access": "互联网访问",
@@ -37532,12 +37532,12 @@ export default {
37532
37532
  "hybrid_switchstate_setting3_description": "开关按钮",
37533
37533
  "hybrid_switchstate_setting_text": "开关状态设置",
37534
37534
  "hybrid_switchstate_title": "开关状态",
37535
- "infobutton_fixedtimecycle": "Fixed Time Cycle lets your SMART+ device turn ON and OFF repeatedly at the interval you choose.**\nSet a cycle duration, and the SMART+ device will switch automatically until you stop it.\n\nWith Fixed Time Cycle you can:\n\n* Define ON and OFF duration (e.g., 5 min ON / 10 min OFF)\n* Run repeated cycles automatically\n* Pause or stop the cycle anytime\n\n**Tip:** Ideal for devices that need regular intervals of power.",
37535
+ "infobutton_fixedtimecycle": "定时计划功能可让您的SMART+设备按设定间隔反复开关。**\n设定循环时长后,设备将自动切换状态直至您手动停止。\n\n定时计划可实现:\n\n* 定义开关机时长(例如:开机5分钟/关机10分钟)\n* 自动执行循环操作\n* 随时暂停或终止循环\n\n**提示:**特别适用于需要定时供电的设备。",
37536
37536
  "infobutton_history": "历史记录功能可追溯设备过去7天内所有手动开关操作。\n精准显示设备启闭时间,助您掌握近期使用动态。\n\n功能亮点:\n\n* 查看上周所有手动开关记录\n* 监测设备使用频率\n* 及时发现异常活动\n\n**注意:**\n历史记录仅记录手动操作,且仅覆盖最近7天数据。",
37537
- "infobutton_poweronbehavior": "Power On Behavior lets you decide how your device reacts when it receives power.\nAfter a power outage or when plugged in, the device can automatically switch ON, remain OFF, or return to the state it had before losing power.\n\nWhat you can do:\n\n* Choose **Always ON** to power the device immediately\n* Choose **Always OFF** to keep it off when powered\n* Choose **Last State** to restore the previous ON/OFF state\n* Adjust the setting for each device individually\n\n**Note:**\nThis ensures your devices behave predictably after power interruptions and helps avoid unwanted switching.",
37538
- "infobutton_randomtimecycle": "Random Time Cycle turns your SMART+ devices ON and OFF at unpredictable intervals within a time range you choose.\nThis creates natural, non-repetitive behavior.\n\nWith Random Time Cycle you can:\n\n* Set a time range for random switching\n* Let the plug turn ON/OFF unpredictably\n* Make your home look occupied when you’re away\n\n**Tip:** Great for lights to simulate presence.",
37539
- "infobutton_timer": "The Timer feature switches your device ON or OFF after a countdown you set.\nChoose how long the timer runs, and once the time is up, the device will act automatically.\n\nWhat you can do:\n\n* Set a one-time countdown (minutes or hours)\n* Trigger an automatic ON or OFF action\n* Use it for temporary automation without creating schedules\n* Cancel or change the countdown at any time\n\n**Note:**\nThe timer works once and does not repeat unless you set it again.",
37540
- "infobutton_timeschedule": "Time Schedule lets you automate your device by setting specific ON and OFF times.\nCreate daily or weekly routines so your SMART+ devices work automatically—no manual control needed.\n\nWith Time Schedule you can:\n\n* Turn devices ON/OFF at chosen times\n* Create multiple schedules for different days\n* Set repeating routines (e.g., weekdays, weekends)\n* Manage all scheduled actions in one place\n\n**Tip:** Make sure your device stays connected so schedules run reliably.\n\nWhat you can do:\n\n* Set one-time or repeating schedules\n* Choose specific days of the week\n* Quickly create new entries with “ON/OFF suggestions”\n* View all schedules in a single timeline\n* Temporarily disable schedules without deleting them",
37537
+ "infobutton_poweronbehavior": "通电行为可自定义设备通电时的响应模式:\n断电后或插电时,设备可自动开启、保持关闭,或恢复至断电前的状态。\n\n操作选项:\n\n* 选择**始终开启**:设备即刻通电\n* 选择**始终关闭**:通电后保持关机状态\n* 选择**恢复上次状态**:还原先前开/关状态\n* 可为每台设备单独调整设置\n\n**注意:**\n此功能确保设备在断电后行为可预测,避免意外切换。",
37538
+ "infobutton_randomtimecycle": "随机定时计划可在您设定的时段内,以不可预测的间隔自动开启/关闭 SMART+ 设备。\n此功能可营造自然且不重复的运行模式。\n\n随机定时计划支持:\n\n* 设定随机开关时段\n* 实现插座不可预测的开关状态\n* 离家时模拟家中有人状态\n\n**小贴士:**特别适用于模拟人居状态的照明场景。",
37539
+ "infobutton_timer": "定时器功能可在设定倒计时结束后自动开启或关闭设备。\n设定计时长度,时间结束后设备将自动执行操作。\n\n功能说明:\n\n* 设置单次倒计时(分钟或小时)\n* 触发自动开关机操作\n* 无需创建计划即可实现临时自动化\n* 可随时取消或修改倒计时\n\n**注意:**\n计时器仅执行一次,除非重新设置否则不会重复。",
37540
+ "infobutton_timeschedule": "定时计划功能可通过设定特定开关时间实现设备自动化。\n创建每日或每周例行任务,让您的SMART+设备自动运行——无需手动控制。\n\n定时计划功能支持:\n\n* 在指定时间开启/关闭设备\n* 为不同日期创建多重计划\n* 设置循环例程(如工作日/周末)\n* 集中管理所有计划任务\n\n**提示:**请确保设备保持联网状态,以保障计划可靠运行。\n\n功能亮点:\n\n* 设置单次或循环计划\n* 选择特定星期几\n* 通过\"开关建议\"快速创建新条目\n* 在单一时间轴查看所有计划\n* 临时禁用计划而不删除",
37541
37541
  "infobutton_totalenergy": "总能量仅显示上次重置后的总消耗/生成数据。\n数据在以下日期切换:",
37542
37542
  "intermittent_time": "间歇时间",
37543
37543
  "internet_access": "互联网访问",