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

Fixed typos and adjusted for uniformity #342

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

ksga
Copy link
Contributor

@ksga ksga commented Nov 16, 2024

Minor adjustments to increase uniformity and corrected a few typos.

Minor adjustments to increase uniformity and corrected a few typos.
@ksga
Copy link
Contributor Author

ksga commented Nov 16, 2024

Great effort by @mortenmathiasen
Just made a few proof changes

@mortenmathiasen
Copy link
Contributor

Looks great @ksga - Thanks!

Copy link
Contributor

@mortenmathiasen mortenmathiasen left a comment

Choose a reason for hiding this comment

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

Looks great @ksga - Thanks!

@jonasbkarlsson
Copy link
Owner

Thanks!

@jonasbkarlsson jonasbkarlsson added minor Create a new minor release translation labels Jan 3, 2025
@jonasbkarlsson jonasbkarlsson merged commit c81f946 into jonasbkarlsson:main Jan 3, 2025
@jonasbkarlsson
Copy link
Owner

@ksga , @mortenmathiasen , does anyone of you use HA 2024.12 (or later)? A lot of my tests fails with HA 2024.12.5, but works fine with HA 2024.11.3. It seems to be related to translation, and maybe it is due to this: https://developers.home-assistant.io/blog/2024/11/21/unit-of-measurement-translations/

   @cached_property
    def _unit_of_measurement_translation_key(self) -> str | None:
        """Return translation key for unit of measurement."""
        if self.translation_key is None:
            return None
        if self.platform is None:
>           raise ValueError(
                f"Entity {type(self)} cannot have a translation key for "
                "unit of measurement before being added to the entity platform"
            )
E           ValueError: Entity <class 'custom_components.ev_smart_charging.sensor.EVSmartChargingSensorCharging'> cannot have a translation key for unit of measurement before being added to the entity platform

/home/vscode/.local/lib/python3.13/site-packages/homeassistant/helpers/entity.py:656: ValueError

@ksga
Copy link
Contributor Author

ksga commented Jan 4, 2025

I'm not sure I follow @jonasbkarlsson .
Actually I'm just using v2.0.1 as it is, waiting for the updated translation to be included in a future release.
On 2025.1.0 the only ev_smart_charging error I'm seeing is the config one mentioned in an issue already:

Logger: homeassistant.core
Kilde: helpers/deprecation.py:222
Første forekomst: 08.56.36 (1 forekomster)
Senest logget: 08.56.36

Config was used from ev_smart_charging, this is a deprecated alias which will be removed in HA Core 2025.11. Use homeassistant.core_config.Config instead, please report it to the author of the 'ev_smart_charging' custom integration

@jonasbkarlsson
Copy link
Owner

jonasbkarlsson commented Jan 4, 2025

Thanks. I have now concluded that this problem "only" affect the test code, not the actual integration. So I need to make some updates of the test code...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Create a new minor release translation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants