diff --git a/homeassistant/components/daikin/const.py b/homeassistant/components/daikin/const.py index e0222d308ea..fbd838b9e47 100644 --- a/homeassistant/components/daikin/const.py +++ b/homeassistant/components/daikin/const.py @@ -10,6 +10,7 @@ ATTR_HEAT_ENERGY = "heat_energy" ATTR_HUMIDITY = "humidity" ATTR_TARGET_HUMIDITY = "target_humidity" ATTR_COMPRESSOR_FREQUENCY = "compressor_frequency" +ATTR_TOTAL_ENERGY_TODAY = "total_energy_today" ATTR_STATE_ON = "on" ATTR_STATE_OFF = "off" diff --git a/homeassistant/components/daikin/manifest.json b/homeassistant/components/daikin/manifest.json index 2a1619594ba..30fecb9c6de 100644 --- a/homeassistant/components/daikin/manifest.json +++ b/homeassistant/components/daikin/manifest.json @@ -3,7 +3,7 @@ "name": "Daikin AC", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/daikin", - "requirements": ["pydaikin==2.6.0"], + "requirements": ["pydaikin==2.7.0"], "codeowners": ["@fredrike"], "zeroconf": ["_dkapi._tcp.local."], "quality_scale": "platinum", diff --git a/homeassistant/components/daikin/sensor.py b/homeassistant/components/daikin/sensor.py index bd64b5742b9..39a6f4aa853 100644 --- a/homeassistant/components/daikin/sensor.py +++ b/homeassistant/components/daikin/sensor.py @@ -33,6 +33,7 @@ from .const import ( ATTR_INSIDE_TEMPERATURE, ATTR_OUTSIDE_TEMPERATURE, ATTR_TARGET_HUMIDITY, + ATTR_TOTAL_ENERGY_TODAY, ATTR_TOTAL_POWER, ) @@ -84,7 +85,7 @@ SENSOR_TYPES: tuple[DaikinSensorEntityDescription, ...] = ( ), DaikinSensorEntityDescription( key=ATTR_TOTAL_POWER, - name="Total Power Consumption", + name="Estimated Power Consumption", device_class=SensorDeviceClass.POWER, native_unit_of_measurement=POWER_KILO_WATT, value_func=lambda device: round(device.current_total_power_consumption, 2), @@ -112,6 +113,14 @@ SENSOR_TYPES: tuple[DaikinSensorEntityDescription, ...] = ( native_unit_of_measurement=FREQUENCY_HERTZ, value_func=lambda device: device.compressor_frequency, ), + DaikinSensorEntityDescription( + key=ATTR_TOTAL_ENERGY_TODAY, + name="Today's Total Energy Consumption", + device_class=SensorDeviceClass.ENERGY, + state_class=SensorStateClass.TOTAL_INCREASING, + native_unit_of_measurement=ENERGY_KILO_WATT_HOUR, + value_func=lambda device: round(device.today_total_energy_consumption, 2), + ), ) @@ -140,6 +149,7 @@ async def async_setup_entry( sensors.append(ATTR_TOTAL_POWER) sensors.append(ATTR_COOL_ENERGY) sensors.append(ATTR_HEAT_ENERGY) + sensors.append(ATTR_TOTAL_ENERGY_TODAY) if daikin_api.device.support_humidity: sensors.append(ATTR_HUMIDITY) sensors.append(ATTR_TARGET_HUMIDITY) diff --git a/requirements_all.txt b/requirements_all.txt index 9681742b695..48bc00e13cf 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1443,7 +1443,7 @@ pycsspeechtts==1.0.4 # pycups==1.9.73 # homeassistant.components.daikin -pydaikin==2.6.0 +pydaikin==2.7.0 # homeassistant.components.danfoss_air pydanfossair==0.1.0 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index b7b56c80f53..48f524504c3 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -887,7 +887,7 @@ pycomfoconnect==0.4 pycoolmasternet-async==0.1.2 # homeassistant.components.daikin -pydaikin==2.6.0 +pydaikin==2.7.0 # homeassistant.components.deconz pydeconz==85