Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias: QW default
- description: ""
- triggers:
- - trigger: state
- entity_id:
- - sensor.qw_mode
- - trigger: state
- entity_id:
- - sensor.qw_powerlimit
- conditions: []
- actions:
- - choose:
- - conditions:
- - condition: state
- entity_id: sensor.qw_mode
- state: sell
- - condition: numeric_state
- entity_id: sensor.qw_powerlimit
- above: 0
- - condition: numeric_state
- entity_id: sensor.battery_state_of_charge
- above: sensor.qw_batterysoc
- sequence:
- - action: input_select.select_option
- metadata: {}
- data:
- option: Selling first
- target:
- entity_id: input_select.deye_desired_work_mode
- - action: input_number.set_value
- metadata: {}
- data:
- value: |-
- {{ (
- [
- (states('sensor.qw_powerlimit')|float(0)|abs/
- states('sensor.battery_voltage')|float(1)
- )|round(0,'ceil')+10,states('sensor.qw_dischargecurrent')|int
- ]|sort
- )[0] }}
- target:
- entity_id: input_number.deye_desired_max_discharge_current
- - action: input_number.set_value
- metadata: {}
- data:
- value: 40
- target:
- entity_id:
- - input_number.deye_desired_capacity_point_5
- - input_number.deye_desired_capacity_point_6
- - action: input_boolean.turn_off
- metadata: {}
- data: {}
- target:
- entity_id:
- - input_boolean.deye_desired_grid_charge_point_5
- - input_boolean.deye_desired_grid_charge_point_6
- - conditions:
- - condition: state
- entity_id: sensor.qw_mode
- state: buy
- - condition: numeric_state
- entity_id: sensor.qw_powerlimit
- above: 0
- sequence:
- - action: input_select.select_option
- metadata: {}
- data:
- option: Zero export to CT
- target:
- entity_id: input_select.deye_desired_work_mode
- - action: input_boolean.turn_on
- metadata: {}
- data: {}
- target:
- entity_id:
- - input_boolean.deye_desired_grid_charge_point_5
- - input_boolean.deye_desired_grid_charge_point_6
- - action: input_number.set_value
- metadata: {}
- data:
- value: 100
- target:
- entity_id:
- - input_number.deye_desired_capacity_point_5
- - input_number.deye_desired_capacity_point_6
- - action: input_number.set_value
- metadata: {}
- data:
- value: |-
- {{ (
- [
- (states('sensor.qw_powerlimit')|float(0)|abs/
- states('sensor.battery_voltage')|float(1)
- )|round(0,'ceil'),states('sensor.qw_chargecurrent')|int
- ]|sort
- )[0] }}
- target:
- entity_id: input_number.deye_desired_max_grid_charge_current
- default:
- mode: single
Advertisement
Add Comment
Please, Sign In to add comment