Skip to content

Commit

Permalink
0.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
lolouk44 committed Jul 28, 2021
1 parent 3d81c5b commit fa52d3b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## [0.1.6] - 2021-03-30
## [0.1.7] - 2021-07-28
### Breaking Change
- Standardized the way sensor data is reported (removed the unit of measurement) - Please update your templates (see README)

## [0.1.6] - 2021-07-27
### Breaking Change
- Standardized the way sensor data is reported (removed the unit of measurement) - Please update your templates (see README)

Expand Down
2 changes: 1 addition & 1 deletion custom_components/currentcost/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"domain": "currentcost",
"name": "Current Cost",
"version": "0.1.6",
"version": "0.1.7",
"documentation": "https://github.com/lolouk44/CurrentCost_HA_CC",
"requirements": [
"pyserial-asyncio==0.4",
Expand Down
10 changes: 5 additions & 5 deletions custom_components/currentcost/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,17 @@ async def serial_read(self, device, rate, **kwargs):
total_watts = wattsch1 + wattsch2 + wattsch3
if appliance == 0:
self._state = total_watts
self._attributes[f"Channel 1"] = f"{wattsch1} W"
self._attributes[f"Channel 2"] = f"{wattsch2} W"
self._attributes[f"Channel 3"] = f"{wattsch3} W"
self._attributes[f"Channel 1"] = wattsch1
self._attributes[f"Channel 2"] = wattsch2
self._attributes[f"Channel 3"] = wattsch3
if appliance is not None:
if imp is not None:
self._attributes[f"Impulses {appliance}"] = imp
self._attributes[f"Impulses/Unit {appliance}"] = ipu
else:
self._attributes[f"Appliance {appliance}"] = f"{total_watts} W"
self._attributes[f"Appliance {appliance}"] = total_watts
if temperature is not None:
self._attributes["Temperature"] = f"{temperature} ºC"
self._attributes["Temperature"] = temperature
self.async_schedule_update_ha_state()

# Data can not be parsed from line, raising exception
Expand Down

0 comments on commit fa52d3b

Please sign in to comment.