Compare commits

...

3 Commits

Author SHA1 Message Date
Lucka
325ea25b93
Merge 52d0214766 into 1cdcb785b5 2025-01-14 09:23:45 +08:00
桔子
1cdcb785b5
feat: add power properties trans (#571)
Some checks are pending
Tests / check-rule-format (push) Waiting to run
Validate / validate-hassfest (push) Waiting to run
Validate / validate-hacs (push) Waiting to run
Validate / validate-lint (push) Waiting to run
Validate / validate-setup (push) Waiting to run
2025-01-14 09:19:28 +08:00
lucka-me
52d0214766
feat: add climate support for electric blanket
- Enable the climate feature (control panel, HomeKit Bridge accessory, etc.) for electric-blanket devices
- Add device conversion for electric-blanket, simply map to heater entity
2025-01-09 02:09:55 +08:00

View File

@ -241,6 +241,29 @@ SPEC_DEVICE_TRANS_MAP: dict[str, dict | str] = {
},
},
'entity': 'heater'
},
'electric-blanket': {
'required': {
'electric-blanket': {
'required': {
'properties': {
'on': {'read', 'write'}
}
},
'optional': {
'properties': {'target-temperature'}
},
}
},
'optional': {
'environment': {
'required': {},
'optional': {
'properties': {'temperature'}
}
},
},
'entity': 'heater'
}
}
@ -431,6 +454,14 @@ SPEC_PROP_TRANS_MAP: dict[str, dict | str] = {
'unit_of_measurement': UnitOfEnergy.KILO_WATT_HOUR
}
},
'power': {
'device_class': SensorDeviceClass.POWER,
'entity': 'sensor',
'optional': {
'state_class': SensorStateClass.MEASUREMENT,
'unit_of_measurement': UnitOfPower.WATT
}
},
'total-battery': {
'device_class': SensorDeviceClass.ENERGY,
'entity': 'sensor',