Skip to content

Conversation

@delcara
Copy link

@delcara delcara commented Oct 23, 2025

Added charging states of Tesla Model Y juniper in HomeAssistant to the chargeStatusMap. Below the possible states in HomeAssistant of the sensor.

options:

  • starting
  • charging
  • stopped
  • complete
  • disconnected
  • no_power device_class: enum
    friendly_name: Tesla Model Y Opladen

Added charging states of Tesla Model Y juniper in HomeAssistant to the chargeStatusMap. Below the possible states in HomeAssistant of the sensor.

options:
  - starting
  - charging
  - stopped
  - complete
  - disconnected
  - no_power
device_class: enum
friendly_name: Tesla Model Y Opladen
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes - here's some feedback:

  • Add a mapping for the 'disconnected' state (e.g., map 'disconnected' to api.StatusA) so none of the sensor options are missing.
  • Verify whether 'complete' should be mapped to StatusC instead of StatusB to accurately reflect a fully charged state.
  • Align the indentation for the new entries (complete and stopped) with the surrounding mappings for consistency.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Add a mapping for the 'disconnected' state (e.g., map 'disconnected' to api.StatusA) so none of the sensor options are missing.
- Verify whether 'complete' should be mapped to StatusC instead of StatusB to accurately reflect a fully charged state.
- Align the indentation for the new entries (complete and stopped) with the surrounding mappings for consistency.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

"true": api.StatusC,
"active": api.StatusC,
"1": api.StatusC,
"starting": api.StatusC,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like "B" to me?

@andig
Copy link
Member

andig commented Oct 24, 2025

Imho, rather than adding more (and partially arbitrary) states, we should allow customizing this in the template:

disconnected:
- foo
- ...
connected:
- ...
charging:
- ...

@andig andig marked this pull request as draft October 26, 2025 17:52
@andig andig added the vehicles Specific vehicle support label Oct 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vehicles Specific vehicle support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants