pyscript icon indicating copy to clipboard operation
pyscript copied to clipboard

Translated state

Open SVH-Powel opened this issue 1 year ago • 1 comments

This is a feature request.

Make support for translated state similar to what is possible in templates in HA 2024.3

https://rc.home-assistant.io/blog/2024/02/28/release-20243/#translating-states-in-your-templates

SVH-Powel avatar Feb 29 '24 08:02 SVH-Powel

Looking at the code, it should work using hass.state_translated() in pyscript, as hass is a HomeAssistant instance, and state_translated is its field, as is state.

ALERTua avatar Feb 29 '24 08:02 ALERTua