Hi there,
i would like to localize a custom component and have visited the official documentation.
https://developers.home-assistant.io/docs/en/internationalization_custom_component_localization.html
I think i understand the approach, but how do i need to define the de.json etc and how can i use a key in code?
class GardenaSmartFrostWarningSensor(GardenaSmartBinarySensor):
def __init__(self, hass, sensor):
"""Initialize the sensor."""
super().__init__(hass, sensor)
self._name = sensor.name + " ambient frost warning"
self._device_class = 'cold'
@property
I would like to localize as example the following string:
" ambient frost warning"
Thanks for your support.