Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vevor EV charger: expose online_state as a switch rather than sensor" #2933

Merged
merged 1 commit into from
Feb 9, 2025

Conversation

alexandrebelloni
Copy link
Contributor

Just as in commit a5ca25f ("Tongou QCB2: expose online_state as a switch rather than sensor"), online_state is used to trigger the updates of dps 6 (power, current, voltage). Once set, updates are happening about every 5 secondes. This needs to be renewed every 2 minutes.

The following HA automation works:

alias: EV charger stats refresh
description: ""
triggers:

  • trigger: state entity_id: - switch.portable_ev_charger to: "on"
  • trigger: state entity_id:
    • timer.ev_charger_stats from: active to: idle conditions: []
      actions:
  • action: switch.turn_on target: entity_id: switch.portable_ev_charger_live_updates data: {}
  • condition: state entity_id: switch.portable_ev_charger state: "on"
  • action: timer.start target: entity_id: timer.ev_charger_stats data: duration: "00:02:00" mode: single

Just as in commit a5ca25f ("Tongou QCB2: expose online_state as a
switch rather than sensor"), online_state is used to trigger the updates of
dps 6 (power, current, voltage). Once set, updates are happening about
every 5 secondes. This needs to be renewed every 2 minutes.

The following HA automation works:

alias: EV charger stats refresh
description: ""
triggers:
  - trigger: state
    entity_id:
      - switch.portable_ev_charger
    to: "on"
  - trigger: state
    entity_id:
      - timer.ev_charger_stats
    from: active
    to: idle
conditions: []
actions:
  - action: switch.turn_on
    target:
      entity_id: switch.portable_ev_charger_live_updates
    data: {}
  - condition: state
    entity_id: switch.portable_ev_charger
    state: "on"
  - action: timer.start
    target:
      entity_id: timer.ev_charger_stats
    data:
      duration: "00:02:00"
mode: single

Signed-off-by: Alexandre Belloni <[email protected]>
@make-all make-all merged commit d68ba35 into make-all:main Feb 9, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants