Skip to content

Conversation

@TylonHH
Copy link
Owner

@TylonHH TylonHH commented Jan 3, 2026

Motivation

  • Make the smart-cost enable switches visually indicate the enabled state with the corporate green color.
  • Fix the chart scale control by removing a duplicated toggle and standardizing the labels to match the UI wording.
  • Ensure the smart-cost UI works reliably for dynamic price/CO₂ scenarios and is covered by a unit test.

Description

  • Add a smart-tariff-switch CSS class to the active and relative switch inputs and set :checked to use var(--evcc-green) for background and border.
  • Remove the duplicate chart scale button group and keep a single, controlled toggle driven by scaleMode in SmartTariffBase.vue.
  • Update English labels in i18n/en.json to "Min–Max" and "0–Max" for the chart scale strings.
  • Add a unit test assets/js/components/Tariff/SmartTariffBase.test.ts that mocks $t/$i18n and verifies the chart scale buttons toggle correctly.

Testing

  • Ran npm test -- SmartTariffBase.test.ts and the unit test completed successfully (pass).

Codex Task

@TylonHH TylonHH merged commit 7359192 into master Jan 3, 2026
@TylonHH TylonHH deleted the codex/run-code-and-take-screenshot branch January 3, 2026 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants