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

Plugins: add charger provider #18037

Merged
merged 8 commits into from
Jan 5, 2025
Merged

Plugins: add charger provider #18037

merged 8 commits into from
Jan 5, 2025

Conversation

andig
Copy link
Member

@andig andig commented Jan 3, 2025

This PR allows using chargers as bool getter/setter. This helps the SG Ready use case.

Sample custom SG Ready charger config:

type: sgready
setmode:
  source: switch
  switch:
  - case: 1 # normal
    set:
      source: const
      value: false
      set:
        source: charger
        config:
          type: template
          template: shelly # Shelly 1 für SG-Kontakt
          host: 192.168.178.29
  - case: 2 # boost
    set:
      source: const
      value: true
      set:
        source: charger
        config:
          type: template
          template: shelly # Shelly 1 für SG-Kontakt
          host: 192.168.178.29
  - case: 3 # dimm
    set:
      source: error
      error: ErrNotAvailable
getmode:
  source: calc
  add:
    - source: const
      value: 1
    - source: charger
      config:
        type: template
        template: shelly # Shelly 1 für SG-Kontakt
        host: 192.168.178.29

Temp (soc) and power could also be added to the charger.

/cc @VolkerK62 we would use this to improve the heating docs and finally replace https://docs.evcc.io/docs/faq#heizstab--wärmepumpe

@andig andig added enhancement New feature or request infrastructure Basic functionality needs documentation Triggers issue creation in evcc-io/docs labels Jan 3, 2025
@andig
Copy link
Member Author

andig commented Jan 4, 2025

@VolkerK62 also added GetMode, basically reads charger.Enabled, converts to int and adds 1. Wdyt of the charger plugin name? I'd rather rename it to switch- does that make sense?

@andig andig merged commit 5b21646 into master Jan 5, 2025
6 checks passed
@andig andig deleted the feat/chargerProvider branch January 5, 2025 10:07
@andig andig restored the feat/chargerProvider branch January 5, 2025 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request infrastructure Basic functionality needs documentation Triggers issue creation in evcc-io/docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant