Automation: alias: BWWP Temperatur nach Zustand description: >- Sonnenuntergang–Sonnenaufgang = 40°C Eco | Akku 100% + Solar >3000W = 55°C Auto | Akku 100% + Solar >1000W = 55°C Eco | sonst 50°C Eco triggers: - trigger: state entity_id: sensor.bwwp_zielprofil for: "00:03:00" conditions: [] actions: - choose: - conditions: - condition: state entity_id: sensor.bwwp_zielprofil state: night sequence: - action: switch.turn_on target: entity_id: switch.avarma_power - action: modbus.write_register data: hub: avarma slave: 1 address: 901 value: 40 - action: modbus.write_register data: hub: avarma slave: 1 address: 900 value: 2 - conditions: - condition: state entity_id: sensor.bwwp_zielprofil state: auto sequence: - action: switch.turn_on target: entity_id: switch.avarma_power - action: modbus.write_register data: hub: avarma slave: 1 address: 901 value: 55 - action: modbus.write_register data: hub: avarma slave: 1 address: 900 value: 1 - conditions: - condition: state entity_id: sensor.bwwp_zielprofil state: eco_high sequence: - action: switch.turn_on target: entity_id: switch.avarma_power - action: modbus.write_register data: hub: avarma slave: 1 address: 901 value: 55 - action: modbus.write_register data: hub: avarma slave: 1 address: 900 value: 2 default: - action: switch.turn_on target: entity_id: switch.avarma_power - action: modbus.write_register data: hub: avarma slave: 1 address: 901 value: 50 - action: modbus.write_register data: hub: avarma slave: 1 address: 900 value: 2 mode: single Template: template: - sensor: - name: "BWWP Zielprofil" unique_id: bwwp_zielprofil icon: mdi:state-machine state: > {% set akku = states('sensor.battery_level') | float(0) %} {% set solar = states('sensor.total_dc_power') | float(0) %} {% set above = is_state('sun.sun', 'above_horizon') %} {{ 'night' if not above else 'auto' if akku >= 99.9 and solar > 3000 else 'eco_high' if akku >= 99.9 and solar > 1000 else 'eco' }}