{"action":"created","issue":{"url":"https://api.github.com/repos/home-assistant/home-assistant/issues/3657","repository_url":"https://api.github.com/repos/home-assistant/home-assistant","labels_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/3657/labels{/name}","comments_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/3657/comments","events_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/3657/events","html_url":"https://github.com/home-assistant/home-assistant/issues/3657","id":180533843,"number":3657,"title":"InfluxDB error invalid number & invalid boolean","user":{"login":"MartinHjelmare","id":3181692,"avatar_url":"https://avatars.githubusercontent.com/u/3181692?v=3","gravatar_id":"","url":"https://api.github.com/users/MartinHjelmare","html_url":"https://github.com/MartinHjelmare","followers_url":"https://api.github.com/users/MartinHjelmare/followers","following_url":"https://api.github.com/users/MartinHjelmare/following{/other_user}","gists_url":"https://api.github.com/users/MartinHjelmare/gists{/gist_id}","starred_url":"https://api.github.com/users/MartinHjelmare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MartinHjelmare/subscriptions","organizations_url":"https://api.github.com/users/MartinHjelmare/orgs","repos_url":"https://api.github.com/users/MartinHjelmare/repos","events_url":"https://api.github.com/users/MartinHjelmare/events{/privacy}","received_events_url":"https://api.github.com/users/MartinHjelmare/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":20,"created_at":"2016-10-02T20:39:41Z","updated_at":"2016-11-26T21:15:04Z","closed_at":null,"body":"Make sure you are running the latest version of Home Assistant before reporting an issue.\n\nYou should only file an issue if you found a bug. Feature and enhancement requests should go in [the Feature Requests section](https://community.home-assistant.io/c/feature-requests) of our community forum:\n\n**Home Assistant release (`hass --version`):**\n0.29.6\n\n**Python release (`python3 --version`):**\nPython 3.4.2\n\n**Component/platform:**\nInfluxDB\n\n**Description of problem:**\nInfluxDB errors for certain entities (groups, automations). My guess is that it has to do with certain state attribute data.\n\n**Expected:**\nInfluxDB component not to error, either by avoiding to record certain data or by parsing it correctly.\n\n**Problem-relevant `configuration.yaml` entries and steps to reproduce:**\n\n``` yaml\ninfluxdb:\n  host: 192.168.1.2\n  username: !secret influxdb_username\n  password: !secret influxdb_password\n```\n1. Start hass with influxdb activated.\n2. Activate automation or turn on group.\n3. See error.\n\n**Traceback (if applicable):**\n\n``` bash\n16-10-02 21:56:51 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=group.hallway, new_state=<state group.hallway=on; entity_id=('sensor.sensebender_micro_bell_1_1', 'sensor.sensebender_micro_bell_1_2', 'sensor.sensebender_micro_bell_1_199', 'binary_sensor.sensebender_micro_bell_1_3'), order=0, friendly_name=hallway @ 2016-10-02T21:56:51.852378+02:00>, old_state=<state group.hallway=off; entity_id=('sensor.sensebender_micro_bell_1_1', 'sensor.sensebender_micro_bell_1_2', 'sensor.sensebender_micro_bell_1_199', 'binary_sensor.sensebender_micro_bell_1_3'), order=0, friendly_name=hallway @ 2016-10-02T21:26:27.744587+02:00>>\n16-10-02 21:56:51 INFO (ThreadPool Worker 10) [homeassistant.helpers.script] Script Rule 1 - Doorbell pressed: Executing step call service\n16-10-02 21:56:51 INFO (MainThread) [homeassistant.core] Bus:Handling <Event logbook_entry[L]: name=Rule 1 - Doorbell pressed, message=has been triggered, domain=automation>\n16-10-02 21:56:51 ERROR (ThreadPool Worker 6) [homeassistant.components.influxdb] Error saving event \"[{'time': datetime.datetime(2016, 10, 2, 19, 56, 51, 852553, tzinfo=<UTC>), 'fields': {'entity_id': ('sensor.sensebender_micro_bell_1_1', 'sensor.sensebender_micro_bell_1_2', 'sensor.sensebender_micro_bell_1_199', 'binary_sensor.sensebender_micro_bell_1_3'), 'value': 1, 'order': 0, 'friendly_name': 'hallway'}, 'measurement': 'group.hallway', 'tags': {'entity_id': 'hallway', 'domain': 'group'}}]\" to InfluxDB\nTraceback (most recent call last):\n  File \"/home/pi/.local/lib/python3.4/site-packages/homeassistant/components/influxdb.py\", line 121, in influx_event_listener\n    influx.write_points(json_body)\n  File \"/home/pi/.local/lib/python3.4/site-packages/influxdb/client.py\", line 402, in write_points\n    tags=tags)\n  File \"/home/pi/.local/lib/python3.4/site-packages/influxdb/client.py\", line 447, in _write_points\n    expected_response_code=204\n  File \"/home/pi/.local/lib/python3.4/site-packages/influxdb/client.py\", line 289, in write\n    headers=headers\n  File \"/home/pi/.local/lib/python3.4/site-packages/influxdb/client.py\", line 259, in request\n    raise InfluxDBClientError(response.content, response.status_code)\ninfluxdb.exceptions.InfluxDBClientError: 400: {\"error\":\"unable to parse 'group.hallway,domain=group,entity_id=hallway entity_id=('sensor.sensebender_micro_bell_1_1', 'sensor.sensebender_micro_bell_1_2', 'sensor.sensebender_micro_bell_1_199', 'binary_sensor.sensebender_micro_bell_1_3'),friendly_name=\\\"hallway\\\",order=0i,value=1i 1475438211852552960': invalid boolean\"}\n\n16-10-02 21:56:51 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=automation.rule_1__doorbell_pressed, new_state=<state automation.rule_1__doorbell_pressed=on; last_triggered=2016-10-02T21:56:51.984732+02:00, friendly_name=Rule 1 - Doorbell pressed @ 2016-10-02T21:26:27.389258+02:00>, old_state=<state automation.rule_1__doorbell_pressed=on; last_triggered=None, friendly_name=Rule 1 - Doorbell pressed @ 2016-10-02T21:26:27.389258+02:00>>\n16-10-02 21:56:52 ERROR (ThreadPool Worker 10) [homeassistant.components.influxdb] Error saving event \"[{'time': datetime.datetime(2016, 10, 2, 19, 56, 51, 987827, tzinfo=<UTC>), 'fields': {'value': 1, 'friendly_name': 'Rule 1 - Doorbell pressed', 'last_triggered': datetime.datetime(2016, 10, 2, 19, 56, 51, 984732, tzinfo=<UTC>)}, 'measurement': 'automation.rule_1__doorbell_pressed', 'tags': {'entity_id': 'rule_1__doorbell_pressed', 'domain': 'automation'}}]\" to InfluxDB\nTraceback (most recent call last):\n  File \"/home/pi/.local/lib/python3.4/site-packages/homeassistant/components/influxdb.py\", line 121, in influx_event_listener\n    influx.write_points(json_body)\n  File \"/home/pi/.local/lib/python3.4/site-packages/influxdb/client.py\", line 402, in write_points\n    tags=tags)\n  File \"/home/pi/.local/lib/python3.4/site-packages/influxdb/client.py\", line 447, in _write_points\n    expected_response_code=204\n  File \"/home/pi/.local/lib/python3.4/site-packages/influxdb/client.py\", line 289, in write\n    headers=headers\n  File \"/home/pi/.local/lib/python3.4/site-packages/influxdb/client.py\", line 259, in request\n    raise InfluxDBClientError(response.content, response.status_code)\ninfluxdb.exceptions.InfluxDBClientError: 400: {\"error\":\"unable to parse 'automation.rule_1__doorbell_pressed,domain=automation,entity_id=rule_1__doorbell_pressed friendly_name=\\\"Rule 1 - Doorbell pressed\\\",last_triggered=2016-10-02 19:56:51.984732+00:00,value=1i 1475438211987826944': invalid number\"}\n```\n\n**Additional info:**\nMy guess is that this has to to with InfluxDB now recording state attributes:\nhttps://github.com/home-assistant/home-assistant/pull/3462\n"},"comment":{"url":"https://api.github.com/repos/home-assistant/home-assistant/issues/comments/263086353","html_url":"https://github.com/home-assistant/home-assistant/issues/3657#issuecomment-263086353","issue_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/3657","id":263086353,"user":{"login":"jeroenjacobs1205","id":8290833,"avatar_url":"https://avatars.githubusercontent.com/u/8290833?v=3","gravatar_id":"","url":"https://api.github.com/users/jeroenjacobs1205","html_url":"https://github.com/jeroenjacobs1205","followers_url":"https://api.github.com/users/jeroenjacobs1205/followers","following_url":"https://api.github.com/users/jeroenjacobs1205/following{/other_user}","gists_url":"https://api.github.com/users/jeroenjacobs1205/gists{/gist_id}","starred_url":"https://api.github.com/users/jeroenjacobs1205/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeroenjacobs1205/subscriptions","organizations_url":"https://api.github.com/users/jeroenjacobs1205/orgs","repos_url":"https://api.github.com/users/jeroenjacobs1205/repos","events_url":"https://api.github.com/users/jeroenjacobs1205/events{/privacy}","received_events_url":"https://api.github.com/users/jeroenjacobs1205/received_events","type":"User","site_admin":false},"created_at":"2016-11-26T21:15:04Z","updated_at":"2016-11-26T21:15:04Z","body":"Having the same problem here. Any updates on this issue?"}}
{"actor":{"display_login":"jeroenjacobs1205"}}