|
4 | 4 | SensorDeviceClass, |
5 | 5 | SensorStateClass, |
6 | 6 | ) |
7 | | -from homeassistant.const import UnitOfEnergy, PERCENTAGE, UnitOfPower, CURRENCY_DOLLAR, EntityCategory |
| 7 | +from homeassistant.const import UnitOfEnergy, PERCENTAGE, UnitOfPower, CURRENCY_DOLLAR, EntityCategory, UnitOfMass |
8 | 8 |
|
9 | 9 | from .entity import AlphaESSSensorDescription, AlphaESSButtonDescription, AlphaESSNumberDescription |
10 | 10 | from .enums import AlphaESSNames |
|
364 | 364 | device_class=SensorDeviceClass.POWER, |
365 | 365 | state_class=SensorStateClass.MEASUREMENT, |
366 | 366 | icon="mdi:flash", |
| 367 | + ), |
| 368 | + AlphaESSSensorDescription( |
| 369 | + key=AlphaESSNames.carbonReduction, |
| 370 | + name="Co2 Reduction", |
| 371 | + native_unit_of_measurement=UnitOfMass.KILOGRAMS, |
| 372 | + device_class=SensorDeviceClass.WEIGHT, |
| 373 | + state_class=SensorStateClass.MEASUREMENT, |
| 374 | + icon="mdi:molecule-co2", |
| 375 | + ), |
| 376 | + AlphaESSSensorDescription( |
| 377 | + key=AlphaESSNames.treePlanted, |
| 378 | + name="Trees Planted", |
| 379 | + native_unit_of_measurement=None, |
| 380 | + state_class=SensorStateClass.MEASUREMENT, |
| 381 | + icon="mdi:tree", |
367 | 382 | ) |
368 | | - |
369 | 383 | ] |
370 | 384 |
|
371 | 385 | LIMITED_SENSOR_DESCRIPTIONS: List[AlphaESSSensorDescription] = [ |
|
646 | 660 | device_class=SensorDeviceClass.POWER, |
647 | 661 | state_class=SensorStateClass.MEASUREMENT, |
648 | 662 | icon="mdi:flash", |
| 663 | + ), |
| 664 | + AlphaESSSensorDescription( |
| 665 | + key=AlphaESSNames.carbonReduction, |
| 666 | + name="Carbon Reduction", |
| 667 | + native_unit_of_measurement=UnitOfMass.KILOGRAMS, |
| 668 | + device_class=SensorDeviceClass.WEIGHT, |
| 669 | + state_class=SensorStateClass.MEASUREMENT, |
| 670 | + icon="mdi:molecule-co2", |
| 671 | + ), |
| 672 | + AlphaESSSensorDescription( |
| 673 | + key=AlphaESSNames.treePlanted, |
| 674 | + name="Trees Planted", |
| 675 | + native_unit_of_measurement=None, |
| 676 | + state_class=SensorStateClass.MEASUREMENT, |
| 677 | + icon="mdi:tree", |
649 | 678 | ) |
650 | 679 | ] |
651 | 680 |
|
|
0 commit comments