Comments (6)
I think this relates with HA and not directly with this integration.
Displaying 512 instead of a string is the wanted behavior as you can interpret 512 as a state that does not change if you change localization.
See this pull request in HA core: home-assistant/core#65743
P.s.: really need to have the localization in your template? As a temporary solution you can use a custom component like this one: https://github.com/PiotrMachowski/Home-Assistant-custom-components-Custom-Templates
from homeassistant-fusionsolar.
@olibos PiotrMachowski/Home-Assistant-custom-components-Custom-Templates#1
from homeassistant-fusionsolar.
Thank you @PiotrMachowski ,
I've installed the version 1.0.1
and it works perfectly!
Template:
Sun State: {{ states("sun.sun") }}
Sun Label: {{ ct_state_translated("sun.sun", "en") }}
Inverter State: {{ states('sensor.inverter_1_inverter_status') }}
Inverter Label: {{ ct_state_translated("sensor.inverter_1_inverter_status", "en") }}
Result: ð
Sun State: above_horizon
Sun Label: Above horizon
Inverter State: 512
Inverter Label: Grid connection
I hope, your proposal reach HomeAssistant Core ð. But in the meantime it's a good workaround!
Thanks @GiorgioUghini for the suggestion!
@tijsverkoyen , it could be good to mention @PiotrMachowski integration in the README to help people in the same use case.
What do you think?
If it helps, I can make a PR with some text suggestions.
from homeassistant-fusionsolar.
Which version of Home Assistant are you using?
from homeassistant-fusionsolar.
Hello @tijsverkoyen ,
Here is my setup:
Home Assistant 2023.2.0
Supervisor 2023.01.1
Operating System 9.5
Frontend 20230201.0 - latest
Here is a sample of my Issue:
With the following YAML
- entity: sensor.inverter_1_active_power
type: custom:template-entity-row
secondary: |
{{states('sensor.inverter_1_inverter_status')}}
icon: mdi:solar-power
name: Soleil
As @GiorgioUghini says, it's not related to your integration but more a general question.
And I agree in most scenarios it's easier to handle codes than texts but for Lovelace dashboard it's not really user friendly ðĪŠ.
I'll try @GiorgioUghini 's workaround in the meaning time, I'll let you know if it works for me
from homeassistant-fusionsolar.
Unfortunately, it does not solve my problem ð.
After installing @PiotrMachowski 's package:
Template:
Sun State: {{ states("sun.sun") }}
Sun Label: {{ ct_state_translated("sun.sun", "en") }}
Inverter State: {{ states('sensor.inverter_1_inverter_status') }}
Inverter Label: {{ ct_state_translated("sensor.inverter_1_inverter_status", "en") }}
Result
Sun State: below_horizon
Sun Label: Below horizon
Inverter State: 0
Inverter Label: 0
from homeassistant-fusionsolar.
Related Issues (20)
- Entities not Updating in Kiosk Mode HOT 8
- All sensors unavailable (Kiosk) HOT 5
- Half of entities are unavailable HOT 4
- Unexpected error fetching FusionSolarOpenAPIDeviceRealKpiType data: 'NoneType' object is not iterable HOT 15
- No more entities provided HOT 63
- User/pass is output to log file. HOT 4
- Always disconnecting HOT 3
- Lifetime energy does not recover after Kiosk max retries. HOT 10
- Energy dashboard showing wrong values HOT 2
- Wrong device_class? HOT 1
- Steps in cumulative quantities. (open api) HOT 1
- Kiosk mode: SyntaxWarning: invalid escape sequence '\?' HOT 2
- Question: have you ever considered using APIs from the web portal? HOT 5
- Error requesting FusionSolarKiosk data HOT 1
- Not in coordinator data HOT 5
- Some numerical sensors do not allow to be used completely in the statistics cards HOT 6
- New entities created when updating kiosk URL HOT 1
- sensor.solar_total_lifetime_energy unknown HOT 6
- Some sensors take previous values at midnight HOT 2
- Not all kiosk sensors are present in Home assistant HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
ð Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ððð
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google âĪïļ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homeassistant-fusionsolar.