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:
2026-08-28 07:07:21 +08:00
committed by KremeCN
parent 4d4dd2893e
commit 387ecacef5
7 changed files with 16 additions and 55 deletions
@@ -111,7 +111,7 @@ class InMemorySceneRepository : SceneRepository {
id = SceneId("${profileId.value}:scene-arriving-home"),
profileId = profileId,
name = "回家模式",
description = "开启 Zigbee 插座控制器",
description = "开启智能插座",
type = AutomationType.MANUAL,
enabled = true,
icon = SceneIcon.HOME,
@@ -120,7 +120,7 @@ class InMemorySceneRepository : SceneRepository {
SceneAction.SocketPower(
id = SceneActionId("${profileId.value}:scene-arriving-home:socket-1"),
profileId = profileId,
deviceName = DeviceName("Zigbee插座控制器"),
deviceName = DeviceName("智能插座"),
powerState = SocketPowerState.ON,
),
),
@@ -129,7 +129,7 @@ class InMemorySceneRepository : SceneRepository {
id = SceneId("${profileId.value}:scene-leaving-home"),
profileId = profileId,
name = "离家模式",
description = "关闭 Zigbee 插座控制器",
description = "关闭智能插座",
type = AutomationType.MANUAL,
enabled = true,
icon = SceneIcon.AWAY,
@@ -138,7 +138,7 @@ class InMemorySceneRepository : SceneRepository {
SceneAction.SocketPower(
id = SceneActionId("${profileId.value}:scene-leaving-home:socket-1"),
profileId = profileId,
deviceName = DeviceName("Zigbee插座控制器"),
deviceName = DeviceName("智能插座"),
powerState = SocketPowerState.OFF,
),
),
@@ -191,7 +191,7 @@ class InMemorySceneRepository : SceneRepository {
conditions = listOf(
SceneCondition.SocketPower(
id = SceneConditionId("${profileId.value}:cond-cooling-socket"),
deviceName = DeviceName("Zigbee插座控制器"),
deviceName = DeviceName("智能插座"),
expectedState = SocketPowerState.OFF,
),
),
@@ -199,7 +199,7 @@ class InMemorySceneRepository : SceneRepository {
SceneAction.SocketPower(
id = SceneActionId("${profileId.value}:scene-cooling:socket-1"),
profileId = profileId,
deviceName = DeviceName("Zigbee插座控制器"),
deviceName = DeviceName("智能插座"),
powerState = SocketPowerState.ON,
),
),