Hello everyone, I’m currently facing some issues with my Template Sensors in Home Assistant after updating to the 23rd version. The logs are showing errors related to the state class ‘total’ being incompatible with the device class ‘power’. I’ve been using these sensors to monitor my total power consumption and energy usage, which has been working perfectly until now. Here’s the configuration I’ve been using:
yaml
sensor:
-
name: “Total Power”
device_class: power
state_class: total
unit_of_measurement: “W”
state: >
{{ states(‘sensor.shellyem3_244cab419f7c_channel_a_power’)| float(0) +
states(‘sensor.shellyem3_244cab419f7c_channel_b_power’)| float(0) +
states(‘sensor.shellyem3_244cab419f7c_channel_c_power’)| float(0) }} -
name: “Total Energy”
device_class: energy
state_class: total
unit_of_measurement: “kWh”
state: >
{{ states(‘sensor.shellyem3_244cab419f7c_channel_a_energy’)| float(0) +
states(‘sensor.shellyem3_244cab419f7c_channel_b_energy’)| float(0) +
states(‘sensor.shellyem3_244cab419f7c_channel_c_energy’)| float(0) }}
I’m wondering if there’s a way to fix this without losing the functionality of these sensors. Additionally, I’m trying to set up a more complex automation in my living room. Here’s what I want to achieve:
- When motion is detected near the dining table, I want the lights to turn on at 100% brightness. If there’s no motion within 10 minutes, the lights should turn off.
- If the front door is opened after 7 PM, I want the lights to dim to 30% brightness and turn off after 5 minutes.
- However, if someone is already moving around (as in step 1), I want to ignore the front door automation.
- Alternatively, if I open the door, I want the lights to dim to 30% and increase to 100% when I step near the dining table. They should turn off after 10 minutes if there’s no motion.
I’ve managed to set up steps 1 and 2, but I’m struggling with step 3. Is Home Assistant smart enough to handle conflicting automations? I think I can figure out step 4, but any tips would be appreciated!
If anyone has encountered similar issues or has suggestions on how to improve my setup, I’d be really grateful. Happy automating!