feat(socket): update smart socket defaults (#12)
## Summary - change the default socket device name from Zigbee插座控制器 to 智能插座 - update new default scenes, in-memory defaults, and Local Experience simulation data to use the new gateway name - remove the duplicated Direct control section from the smart socket detail screen, keeping the main power control - remove the unused direct-control strings ## Data behavior - existing configured devices are not renamed - existing persisted scenes are not migrated - only newly created default content uses 智能插座 ## Verification - ./gradlew.bat :android:app:assembleDebug --no-daemon - installed on mulator-5554 - confirmed the Local Experience device card shows 智能插座 - confirmed the socket detail screen has no Direct control section or duplicate ON/OFF buttons Automated tests were not run. Reviewed-on: #12 Co-authored-by: KremeCN <3265494849@qq.com>
This commit was merged in pull request #12.
This commit is contained in:
+6
-6
@@ -99,14 +99,14 @@ class RoomSceneRepository(
|
||||
|
||||
private fun defaultScenes(profileId: ProviderProfileId): List<Scene> = listOf(
|
||||
Scene(
|
||||
SceneId("${profileId.value}:scene-arriving-home"), profileId, "回家模式", "开启 Zigbee 插座控制器",
|
||||
SceneId("${profileId.value}:scene-arriving-home"), profileId, "回家模式", "开启智能插座",
|
||||
AutomationType.MANUAL, true, SceneIcon.HOME, SceneColor("#4CAF50"),
|
||||
actions = listOf(SceneAction.SocketPower(SceneActionId("${profileId.value}:arrive:socket"), profileId, DeviceName("Zigbee插座控制器"), SocketPowerState.ON)),
|
||||
actions = listOf(SceneAction.SocketPower(SceneActionId("${profileId.value}:arrive:socket"), profileId, DeviceName("智能插座"), SocketPowerState.ON)),
|
||||
),
|
||||
Scene(
|
||||
SceneId("${profileId.value}:scene-leaving-home"), profileId, "离家模式", "关闭 Zigbee 插座控制器",
|
||||
SceneId("${profileId.value}:scene-leaving-home"), profileId, "离家模式", "关闭智能插座",
|
||||
AutomationType.MANUAL, true, SceneIcon.AWAY, SceneColor("#FF8A65"),
|
||||
actions = listOf(SceneAction.SocketPower(SceneActionId("${profileId.value}:leave:socket"), profileId, DeviceName("Zigbee插座控制器"), SocketPowerState.OFF)),
|
||||
actions = listOf(SceneAction.SocketPower(SceneActionId("${profileId.value}:leave:socket"), profileId, DeviceName("智能插座"), SocketPowerState.OFF)),
|
||||
),
|
||||
Scene(
|
||||
SceneId("${profileId.value}:scene-temperature-alert"), profileId, "高温提醒", "室温高于 28°C 时发送提醒",
|
||||
@@ -118,8 +118,8 @@ class RoomSceneRepository(
|
||||
SceneId("${profileId.value}:scene-cooling-auto"), profileId, "高温自动降温", "当室温高于 28°C 时开启插座",
|
||||
AutomationType.AUTOMATIC, true, SceneIcon.THERMOSTAT, SceneColor("#26A69A"),
|
||||
triggers = listOf(SceneTrigger.Temperature(SceneTriggerId("${profileId.value}:cooling-temp"), DeviceName("温湿度传感器"), ComparisonOperator.GREATER_THAN, 28.0, "温度高于 28°C")),
|
||||
conditions = listOf(SceneCondition.SocketPower(SceneConditionId("${profileId.value}:cooling-socket"), DeviceName("Zigbee插座控制器"), SocketPowerState.OFF)),
|
||||
actions = listOf(SceneAction.SocketPower(SceneActionId("${profileId.value}:cooling:on"), profileId, DeviceName("Zigbee插座控制器"), SocketPowerState.ON)),
|
||||
conditions = listOf(SceneCondition.SocketPower(SceneConditionId("${profileId.value}:cooling-socket"), DeviceName("智能插座"), SocketPowerState.OFF)),
|
||||
actions = listOf(SceneAction.SocketPower(SceneActionId("${profileId.value}:cooling:on"), profileId, DeviceName("智能插座"), SocketPowerState.ON)),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user