1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-14 22:05:54 +00:00

Compare commits

..

3 Commits

Author SHA1 Message Date
Otto Winter
6ccab2bef9 Bump version to v1.12.1 2019-03-20 13:11:55 +01:00
Otto Winter
475aa4879c Fix IPAddress in validate (#488)
Fixes https://github.com/esphome/issues/issues/141
2019-03-20 13:11:48 +01:00
Otto Winter
4452473735 Fix filter_out: nan filer (#486)
* Fix filter_out nan filter

Fixes https://github.com/esphome/issues/issues/138

* Add test
2019-03-20 13:11:48 +01:00
4 changed files with 7 additions and 3 deletions

View File

@@ -2,10 +2,10 @@
MAJOR_VERSION = 1
MINOR_VERSION = 12
PATCH_VERSION = '0'
PATCH_VERSION = '1'
__short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION)
__version__ = '{}.{}'.format(__short_version__, PATCH_VERSION)
ESPHOME_CORE_VERSION = '1.12.0'
ESPHOME_CORE_VERSION = '1.12.1'
ESP_PLATFORM_ESP32 = 'ESP32'
ESP_PLATFORM_ESP8266 = 'ESP8266'

View File

@@ -1,4 +1,5 @@
from collections import OrderedDict
import math
from esphome.core import CORE, HexInt, Lambda, TimePeriod, TimePeriodMicroseconds, \
TimePeriodMilliseconds, TimePeriodSeconds, TimePeriodMinutes
@@ -260,6 +261,8 @@ class FloatLiteral(Literal):
self.float_ = value
def __str__(self):
if math.isnan(self.float_):
return u"NAN"
return u"{:f}f".format(self.float_)

View File

@@ -328,7 +328,7 @@ def represent_odict(dump, tag, mapping, flow_style=None):
def represent_secret(value):
return yaml.ScalarNode(tag=u'!secret', value=_SECRET_VALUES[value])
return yaml.ScalarNode(tag=u'!secret', value=_SECRET_VALUES[text_type(value)])
def unicode_representer(_, uni):

View File

@@ -173,6 +173,7 @@ sensor:
- 40.0 -> 45.0
- 100.0 -> 102.5
- filter_out: 42.0
- filter_out: nan
- sliding_window_moving_average:
window_size: 15
send_every: 15