feat: convert the mode of the ptc bath heater to the preset mode (#874)

This commit is contained in:
Li Shuzhen
2025-03-13 17:37:44 +08:00
committed by GitHub
parent 8be0fa5d61
commit 8f0a69c611
2 changed files with 46 additions and 41 deletions

View File

@ -138,7 +138,7 @@ SPEC_DEVICE_TRANS_MAP: dict = {
'optional': {
'properties': {'mode', 'target-humidity'}
}
},
}
},
'optional': {
'environment': {
@ -164,8 +164,7 @@ SPEC_DEVICE_TRANS_MAP: dict = {
'continue-sweep',
'stop-and-gocharge'
}
},
}
}
},
'optional': {
@ -178,9 +177,9 @@ SPEC_DEVICE_TRANS_MAP: dict = {
'required': {
'properties': {
'battery-level': {'read'}
},
}
}
},
}
},
'entity': 'vacuum'
},
@ -196,7 +195,7 @@ SPEC_DEVICE_TRANS_MAP: dict = {
},
'optional': {
'properties': {'target-humidity'}
},
}
}
},
'optional': {
@ -237,7 +236,7 @@ SPEC_DEVICE_TRANS_MAP: dict = {
'properties': {
'target-temperature', 'mode', 'fan-level',
'temperature'}
},
}
}
},
'optional': {
@ -246,7 +245,7 @@ SPEC_DEVICE_TRANS_MAP: dict = {
'optional': {
'properties': {'temperature', 'relative-humidity'}
}
},
}
},
'entity': 'thermostat'
},
@ -260,7 +259,7 @@ SPEC_DEVICE_TRANS_MAP: dict = {
},
'optional': {
'properties': {'target-temperature', 'heat-level'}
},
}
}
},
'optional': {
@ -269,20 +268,21 @@ SPEC_DEVICE_TRANS_MAP: dict = {
'optional': {
'properties': {'temperature', 'relative-humidity'}
}
},
}
},
'entity': 'heater'
},
'bath-heater': {
'required': {
'ptc-bath-heater': {
'required': {},
'optional': {
'required': {
'properties': {
'target-temperature', 'heat-level',
'temperature', 'mode'
'mode':{'read', 'write'}
}
},
'optional': {
'properties': {'target-temperature', 'temperature'}
}
}
},
'optional': {
@ -292,7 +292,13 @@ SPEC_DEVICE_TRANS_MAP: dict = {
'properties': {
'on', 'fan-level', 'horizontal-swing', 'vertical-swing'
}
},
}
},
'environment': {
'required': {},
'optional': {
'properties': {'temperature'}
}
}
},
'entity': 'bath-heater',
@ -308,7 +314,7 @@ SPEC_DEVICE_TRANS_MAP: dict = {
},
'optional': {
'properties': {'mode', 'temperature'}
},
}
}
},
'optional': {},
@ -400,7 +406,7 @@ SPEC_SERVICE_TRANS_MAP: dict = {
},
'optional': {
'properties': {
'motor-control', 'status', 'current-position', 'target-position'
'status', 'current-position', 'target-position'
}
},
'entity': 'cover'