jontofront / ecoNET-300-Home-Assistant-Integration

ecoNET 300 integration to HA
11 stars 4 forks source link

Issue with reading param value (editParam) from econet300 #26

Closed zaapp closed 12 months ago

zaapp commented 1 year ago

Set parameter works, but read is corrupted. Does it work in your implementation? image

zaapp commented 1 year ago

Ahhh issue to close. I found simple solution. `def _sync_state(self, value): """Sync state""" self._attr_native_value = value['value'] self.async_write_ha_state()

async def async_set_native_value(self, value: str) -> None:
    """Update the current value."""
    _LOGGER.debug("Set value: {}".format(value))

    #if value == self._attr_native_value:
    #    return

    #if value > self._attr_native_max_value:
    #    _LOGGER.warning(
    #        "Requested value: '{}' exceeds maximum allowed value: '{}'".format(value, self._attr_max_value))
    #    return

    #if value < self._attr_native_min_value:
    #    _LOGGER.warning("Requested value: '{}' is below allowed value: '{}'".format(value, self._attr_min_value))
    #    return

    if not await self._api.set_param(self.entity_description.key, int(value)):
        _LOGGER.warning("Setting value failed")
        return

    self._attr_native_value = value['value']
    self.async_write_ha_state()`
jontofront commented 1 year ago

I try do it but did't work, now I am testing https://github.com/jontofront/ecoNET-300-Home-Assistant-Integration/tree/edit-params for me looks work

What you you have in diagnostic parameters if you work from my Fork image

jontofront commented 1 year ago

@zaapp What controller do you have? I see your sensor keys is diffrent

zaapp commented 1 year ago

I used this custom integration with heat pump FoxAIR GL-15-3. Check data from my controller: "controllerID":"ecoMAX360i" "modulePanelSoftVer":"S003.05_1.01", "ecosrvSoftVer":"3.2.3842", "moduleASoftVer":"S003.06",