From 58509f8bba11e05d742ec72b52db61a3299e37df Mon Sep 17 00:00:00 2001
From: Lukas <lukas.hetzenecker@gmail.com>
Date: Mon, 5 Dec 2016 00:08:14 +0100
Subject: [PATCH] [0.34] bugfix influxdb node_id (#4712)

* Bugfix for #4709 - do not convert node_id to float

* Update influxdb.py
---
 homeassistant/components/influxdb.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/homeassistant/components/influxdb.py b/homeassistant/components/influxdb.py
index 167767bc00e..08296ad65c7 100644
--- a/homeassistant/components/influxdb.py
+++ b/homeassistant/components/influxdb.py
@@ -120,7 +120,8 @@ def setup(hass, config):
 
         for key, value in state.attributes.items():
             if key != 'unit_of_measurement':
-                if isinstance(value, (str, float, bool)):
+                if isinstance(value, (str, float, bool)) or \
+                        key.endswith('_id'):
                     json_body[0]['fields'][key] = value
                 elif isinstance(value, int):
                     # Prevent column data errors in influxDB.
-- 
GitLab