Closed bazcurtis closed 1 year ago
@bazcurtis if you switch to 'full' instead of 'lite' you'll see it's working, but in the 'lite' view maybe just gives the dot based on space available etc .... : -
Yes the lite view only shows the coloured dot.
You can see the list of codes below
There are possibly missing codes, I could only add a limited number as I don't have a full list from anywhere.
..... from sensor.py
def push_update(self, event):
_LOGGER.debug(f"Sensor: register event received Bank: {self._bank} Attrib: {self._device_attribute} Name: {self._attr_name}") # fmt: skip
self._data = event.data.get("data", {})
state_text = ""
status = int(self._data.get(self._device_attribute, 0.0))
# fmt: off
if status == 0:
state_text = "Standby"
elif status == 1:
state_text = "Error"
elif status == 2:
state_text = "Inverting"
elif status == 4:
state_text = "Solar > Load - Surplus > Grid"
elif status == 5:
state_text = "Float"
elif status == 7:
state_text = "Charger Off"
elif status == 8:
state_text = "Supporting"
elif status == 9:
state_text = "Selling"
elif status == 10:
state_text = "Pass Through"
elif status == 11:
state_text = "Offsetting"
elif status == 12:
state_text = "Solar > Battery Charging"
elif status == 16:
state_text = "Battery Discharging > LOAD - Surplus > Grid"
elif status == 17:
state_text = "Temperature Over Range"
elif status == 20:
state_text = "Solar + Battery Discharging > LOAD - Surplus > Grid"
elif status == 32:
state_text = "AC Battery Charging"
elif status == 40:
state_text = "Solar + Grid > Battery Charging"
elif status == 64:
state_text = "No Grid : Battery > EPS"
elif status == 136:
state_text = "No Grid : Solar > EPS - Surplus > Battery Charging"
elif status == 192:
state_text = "No Grid : Solar + Battery Discharging > EPS"
else:
state_text = "Unknown"
self._attr_native_value = f"{state_text}"
# fmt: on
..... from sensor.py
def push_update(self, event): _LOGGER.debug(f"Sensor: register event received Bank: {self._bank} Attrib: {self._device_attribute} Name: {self._attr_name}") # fmt: skip self._data = event.data.get("data", {}) state_text = "" status = int(self._data.get(self._device_attribute, 0.0)) # fmt: off if status == 0: state_text = "Standby" elif status == 1: state_text = "Error" elif status == 2: state_text = "Inverting" elif status == 4: state_text = "Solar > Load - Surplus > Grid" elif status == 5: state_text = "Float" elif status == 7: state_text = "Charger Off" elif status == 8: state_text = "Supporting" elif status == 9: state_text = "Selling" elif status == 10: state_text = "Pass Through" elif status == 11: state_text = "Offsetting" elif status == 12: state_text = "Solar > Battery Charging" elif status == 16: state_text = "Battery Discharging > LOAD - Surplus > Grid" elif status == 17: state_text = "Temperature Over Range" elif status == 20: state_text = "Solar + Battery Discharging > LOAD - Surplus > Grid" elif status == 32: state_text = "AC Battery Charging" elif status == 40: state_text = "Solar + Grid > Battery Charging" elif status == 64: state_text = "No Grid : Battery > EPS" elif status == 136: state_text = "No Grid : Solar > EPS - Surplus > Battery Charging" elif status == 192: state_text = "No Grid : Solar + Battery Discharging > EPS" else: state_text = "Unknown" self._attr_native_value = f"{state_text}" # fmt: on
That's excellent thanks, I'll get them updated as soon as I get chance. Possibly Sunday unless slipx can get to it sooner.
Thanks very much. It is interesting there are so many codes. I have only seen these.
20 - Solar + Battery Discharging > LOAD - Surplus > Grid (On Grid as well) 12 - Solar > Battery Charging 4 - Solar > Load - Surplus > Grid 0 - Standby 32 - AC Charging 16 - Battery Discharging > LOAD - Surplus
Is there an existing issue for this?
Current Behavior
I can see the dot next to the Inverter, but I can't see the code.
I would also like to thank you for support Lux Inverters.
Steps To Reproduce
No response
Expected behaviour
I assume a code should be shown somewhere
Card Version
2.0.0
Home Assistant Version
2023.8.2
Configuration
Relevant log output
No response