home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
74.08k stars 31.09k forks source link

MySensors configuration has breaking change in 0.64 #12683

Closed Bottesford closed 6 years ago

Bottesford commented 6 years ago

Python 3.5.3 HA: 0.64 Component: MySensors

Upon upgrading to 0.64 the MySensors component now requires optional settings topic_in_prefix and topic_out_prefix to be set even when not using the MQTT function.

My existing MySensors config (working in 0.63.3):

gateways:
  - device: !secret mysensors_gateway_ip
    persistence_file: !secret mysensors_persistence_file
persistence: true
version: '2.0' 

Error upon starting 0.64:

2018-02-26 07:19:03 ERROR (MainThread) [homeassistant.config] Invalid config for [mysensors]: length of value must be at least 1 for dictionary value @ data['mysensors']['gateways'][0]['topic_in_prefix']. Got None length of value must be at least 1 for dictionary value @ data['mysensors']['gateways'][0]['topic_out_prefix']. Got None. (See /home/pi/homeassistant_config/configuration.yaml, line 134). Please check the docs at https://home-assistant.io/components/mysensors/

To fix the error and allow MySensors to function I had to change my config to:

gateways:
  - device: !secret mysensors_gateway_ip
    persistence_file: !secret mysensors_persistence_file
    topic_in_prefix: 'a'
    topic_out_prefix: 'a'
persistence: true
version: '2.0' 

An empty string was not allowed as an value so I set them to 'a' for now.

MartinHjelmare commented 6 years ago

It's a bug after a home assistant core requirement upgrade (voluptuous).

I'll fix it.