Skip to content

Commit

Permalink
feat(msb): add charge and discharge #18
Browse files Browse the repository at this point in the history
  • Loading branch information
acesyde committed Mar 18, 2023
1 parent 7db7e56 commit 2650002
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,17 @@ _Integration to integrate with [MyLight Systems][mylight_systems]._
| `sensor.total_grid_without_battery_consumption` | Total power consumption from the grid without virtual battery. | W/h | :white_check_mark: |
| `sensor.total_autonomy_rate` | Autonomy rate. | % | :white_check_mark: |
| `sensor.total_self_conso` | Self consumption. | % | :white_check_mark: |
| `sensor.total_msb_charge` | My Smart Battery Charge. | W/h | :white_check_mark: |
| `sensor.total_msb_discharge` | My Smart Battery Discharge. | W/h | :white_check_mark: |

## Installation

## Automatic

[![Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=acesyde&repository=hassio_mylight_integration&category=integration)

## Manual

1. Using the tool of choice open the directory (folder) for your HA configuration (where you find `configuration.yaml`).
1. If you do not have a `custom_components` directory (folder) there, you need to create it.
1. In the `custom_components` directory (folder) create a new folder called `mylight_systems`.
Expand Down
4 changes: 2 additions & 2 deletions custom_components/mylight_systems/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class MyLightSensorEntityDescription(
MyLightSensorEntityDescription(
key="total_msb_charge",
name="Total My Smart Battery Charge",
icon="mdi:solar-panel",
icon="mdi:battery-high",
native_unit_of_measurement=UnitOfEnergy.WATT_HOUR,
state_class=SensorStateClass.TOTAL_INCREASING,
device_class=SensorDeviceClass.ENERGY,
Expand All @@ -107,7 +107,7 @@ class MyLightSensorEntityDescription(
MyLightSensorEntityDescription(
key="total_msb_discharge",
name="Total My Smart Battery Discharge",
icon="mdi:solar-panel",
icon="mdi:battery-low",
native_unit_of_measurement=UnitOfEnergy.WATT_HOUR,
state_class=SensorStateClass.TOTAL_INCREASING,
device_class=SensorDeviceClass.ENERGY,
Expand Down

0 comments on commit 2650002

Please sign in to comment.