Teslemetry / hass-teslemetry

Teslemetry integration from Home Assistant through HACS
https://teslemetry.com
MIT License
13 stars 7 forks source link

Setting number.tessy_charge_current complains about number.tessy_charge_limit is outside valid #109

Closed Johanbos closed 4 months ago

Johanbos commented 4 months ago

Checklist

Describe the issue

When setting a valid value for tessy_charge_current an error shows about the tessy_charge_limit range.

The logical range for tessy_charge_current should be 5 - 40?

Executed: 4 July 2024 at 12:24:11
Error: Value 10.0 for number.tessy_charge_limit is outside valid range 50 - 100
Result:

params:
  domain: number
  service: set_value
  service_data:
    value: 10
    device_id:
      - f80dc8862628273547d96b1a72cfa424
    entity_id:
      - number.tessy_charge_current
  target:
    device_id:
      - f80dc8862628273547d96b1a72cfa424
    entity_id:
      - number.tessy_charge_current
running_script: false

Reproduction steps

  1. Install Integration and supply accesstoken
  2. Leave everything default!
  3. Create automation setting tessy_charge_current
  4. Error is shown instead of setting the value ...

Debug logs

No response

Johanbos commented 4 months ago

Hmm, https://github.com/Teslemetry/hass-teslemetry/blob/main/custom_components/teslemetry/number.py & https://github.com/home-assistant/core/blob/dev/homeassistant/components/teslemetry/number.py seem to have the proper values.

Bre77 commented 4 months ago

The issue is you're setting the device_id and entity_id so you end up calling set_value on tessy_charge_limit instead.

Please only specify the entity_id and not the device_id