Files
core/tests/components
Phil Hawthorne 1ddcab5e26 Make percentage string values as floats/ints in InfluxDB (#7879)
* Make percentage string values as floats in InfluxDB

Currently Z-wave and other compontents report an attributes battery
level as an integer, for example

```yaml
{
"is_awake": false,
"battery_level": 61,
}
```

However, some other components like Vera add the battery level as a
string

```yaml
{
"Vera Device Id": 25,
"device_armed": "False",
"battery_level": "63%",
"device_tripped": "False",
}
```

By removing any % signs in the field, this will send the value to
InfluxDB as an int, which can then be used to plot the data in graphs
correctly, like other percentage fields.

* Add tests and remove all trailing non digits

Adds tests and now removes all trailing non-numeric characters for
better use

* Update variable name for InfluxDB digit checks

Updates the variable used for the regex to remove trailing non digits

* Fix linting errors for InfluxDB component

Fixes a small linting error on the InfluxDB component
2017-06-14 00:42:55 +02:00
..
2017-06-03 18:51:29 -07:00
2017-06-04 22:55:06 -07:00
2017-05-19 07:37:39 -07:00
2017-06-12 22:27:25 -07:00
2017-05-13 21:25:54 -07:00
2016-03-09 10:25:50 +01:00
2017-05-11 09:04:17 -07:00
2017-05-19 07:37:39 -07:00
2017-05-12 20:14:17 -07:00
2017-05-19 07:37:39 -07:00
2017-03-04 15:10:36 -08:00
2017-04-11 09:23:41 -07:00
2017-03-30 00:50:53 -07:00
2017-04-29 22:04:49 -07:00