Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias: Deye control
- description: ""
- triggers:
- - trigger: time_pattern
- seconds: /5
- conditions: []
- actions:
- - if:
- - condition: template
- value_template: >-
- {{ states('select.work_mode') !=
- states('input_select.deye_desired_work_mode') }}
- then:
- - action: select.select_option
- metadata: {}
- target:
- entity_id: select.work_mode
- data:
- option: "{{ states('input_select.deye_desired_work_mode') }}"
- - delay:
- hours: 0
- minutes: 0
- seconds: 1
- - if:
- - condition: template
- value_template: >-
- {{ states('switch.grid_charge_point_5') !=
- states('input_boolean.deye_desired_grid_charge_point_5') }}
- then:
- - action: switch.toggle
- metadata: {}
- data: {}
- target:
- entity_id: switch.grid_charge_point_5
- - delay:
- hours: 0
- minutes: 0
- seconds: 1
- - if:
- - condition: template
- value_template: >-
- {{ states('number.max_grid_charge_current') !=
- states('input_number.deye_desired_max_grid_charge_current') }}
- then:
- - action: number.set_value
- metadata: {}
- data:
- value: "{{ states('input_number.deye_desired_max_grid_charge_current') }}"
- target:
- entity_id: number.max_grid_charge_current
- - delay:
- hours: 0
- minutes: 0
- seconds: 1
- - if:
- - condition: template
- value_template: >-
- {{ states('number.max_discharge_current') !=
- states('input_number.deye_desired_max_discharge_current') }}
- then:
- - action: number.set_value
- metadata: {}
- data:
- value: "{{ states('input_number.deye_desired_max_discharge_current') }}"
- target:
- entity_id: number.max_discharge_current
- - delay:
- hours: 0
- minutes: 0
- seconds: 1
- - if:
- - condition: template
- value_template: >-
- {{ states('number.capacity_point_5')|int !=
- states('input_number.deye_desired_capacity_point_5')|int }}
- then:
- - action: number.set_value
- metadata: {}
- data:
- value: "{{ states('input_number.deye_desired_capacity_point_5') }}"
- target:
- entity_id: number.capacity_point_5
- - delay:
- hours: 0
- minutes: 0
- seconds: 1
- - if:
- - condition: template
- value_template: >-
- {{ states('switch.grid_charge_point_6') !=
- states('input_boolean.deye_desired_grid_charge_point_6') }}
- then:
- - action: switch.toggle
- metadata: {}
- data: {}
- target:
- entity_id:
- - switch.grid_charge_point_6
- - delay:
- hours: 0
- minutes: 0
- seconds: 1
- - if:
- - condition: template
- value_template: >-
- {{ states('number.capacity_point_6')|int !=
- states('input_number.deye_desired_capacity_point_6')|int }}
- then:
- - action: number.set_value
- metadata: {}
- data:
- value: "{{ states('input_number.deye_desired_capacity_point_6') }}"
- target:
- entity_id: number.capacity_point_6
- - delay:
- hours: 0
- minutes: 0
- seconds: 1
- mode: queued
- max: 10
Advertisement
Add Comment
Please, Sign In to add comment