Skip to content

Commit

Permalink
Merge pull request #30 from gerard33/patch-1
Browse files Browse the repository at this point in the history
Update value_template for template sensors
  • Loading branch information
gurbyz authored Dec 28, 2019
2 parents c9603a4 + 67a99b6 commit 111eb4a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ sensor:
friendly_name: 'Grid power consumption'
unit_of_measurement: 'W'
value_template: >-
{{ (1000 * (states("sensor.power_consumption") | float) | int }}
{{ (1000 * (states("sensor.power_consumption") | float)) | int }}
grid_power_production:
friendly_name: 'Grid power production'
unit_of_measurement: 'W'
value_template: >-
{{ (1000 * (states("sensor.power_production") | float) | int }}
{{ (1000 * (states("sensor.power_production") | float)) | int }}
```
In this example the sensors names for *YOUR_SOLAR_POWER_SENSOR*, *YOUR_GRID_POWER_CONSUMPTION_SENSOR* and *YOUR_GRID_POWER_PRODUCTION_SENSOR* are `solar_power`, `grid_power_consumption` resp. `grid_power_production`.
Expand Down Expand Up @@ -290,4 +290,4 @@ A more advanced example for in the `ui-lovelace.yaml` file:
This custom card is licensed under the [Apache License 2.0](https://github.com/gurbyz/power-wheel-card/blob/master/LICENSE).

## Credits
* [gurbyz](https://github.com/gurbyz)
* [gurbyz](https://github.com/gurbyz)

0 comments on commit 111eb4a

Please sign in to comment.