Skip to content

Commit

Permalink
SMARTCOSTLIMIT steps are now by 0.5 cent (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
marq24 committed Aug 20, 2024
1 parent 01afde2 commit 65af988
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion custom_components/evcc_intg/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription):
mode = NumberMode.BOX,
native_max_value=20.00,
native_min_value=0.00,
native_step=0.01,
native_step=0.005,
native_unit_of_measurement="@@@/kWh",
)
]
Expand Down
2 changes: 1 addition & 1 deletion custom_components/evcc_intg/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"iot_class": "local_polling",
"issue_tracker": "https://github.com/marq24/ha-evcc/issues",
"requirements": [],
"version": "2024.7.0"
"version": "2024.8.0"
}
4 changes: 2 additions & 2 deletions custom_components/evcc_intg/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def native_value(self):
return "unknown"
else:
if self.tag == Tag.SMARTCOSTLIMIT:
value = round(float(value), 2)
value = round(float(value), 3)
else:
value = int(value)

Expand All @@ -96,7 +96,7 @@ def native_value(self):
async def async_set_native_value(self, value) -> None:
try:
if self.tag == Tag.SMARTCOSTLIMIT:
await self.coordinator.async_write_tag(self.tag, round(float(value), 2), self.idx, self)
await self.coordinator.async_write_tag(self.tag, round(float(value), 3), self.idx, self)
else:
await self.coordinator.async_write_tag(self.tag, int(value), self.idx, self)

Expand Down

0 comments on commit 65af988

Please sign in to comment.