Skip to content

Convert EV Connector Status from int to enum #178

Description

@IamGimli

I've identified the following values on my plug-in hybrid RAV4. There may be more on models that support Level 3 (DC) charging.

           "5": "Locked",
           "4": "Unlocked",
           "2": "Disconnected",

I created the following template to reflect those values:

   - sensor:
       name: "RAV 4 Connector Status"
       state: >-
         {% set mapper = {
             "5": "Locked",
             "4": "Unlocked",
             "2": "Disconnected",
         } %}
         {{ mapper.get(states('sensor.connector_status_2023_rav4_prime'), 'Unknown') }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions