New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix telegram_bot #7877
Fix telegram_bot #7877
Conversation
@balloob I was running some tests on 2017-06-03 05:18:53 INFO (MainThread) [homeassistant.setup] Setting up telegram_bot
2017-06-03 05:18:53 ERROR (MainThread) [homeassistant.setup] Error during setup of component telegram_bot
Traceback (most recent call last):
File "/home/mdemello/devel/home-assistant/homeassistant/setup.py", line 187, in _async_setup_component
result = yield from component.async_setup(hass, processed_config)
File "/home/mdemello/devel/home-assistant/homeassistant/components/telegram_bot/__init__.py", line 285, in async_setup
yield from async_setup_platform(conf.get(CONF_PLATFORM), conf)
AttributeError: 'list' object has no attribute 'get' Then I checked the pending PRs list to see if someone already tried to fix it and you beat me :) 馃 Using the Good work!! LGTM! 馃憤 |
I think this broke when we changed from component schema to platform schema for the config. This was done after last release, so 0.45.1 was/is working as far as I can tell. Components with platform schema will modify the config into a list of platforms during setup, hence the error seen above. |
@MartinHjelmare, you're right, this was commented in #7294 (comment) but it went unnoticed.
In the end it seems it was for most... As a consolation, the module works very well for me (I have the configuration without hyphens). I use in my home the |
@MartinHjelmare @azogue @balloob I want to add that having a "telegram", "telegram_bot", "telegram_webhook" and "telegram_polling" component can be pretty confusing. Originally "telegram" was for sending. Webhook and Polling for receiving. Looking at the docs doesn't really make it clearer. (For example, why is Anyway: Piece and keep up the excellent work! Love hass ! |
Description:
The telegram_bot code was never even able to work 馃槩 . This is bad.
This should probably fix it, I don't use telegram but at least the big mistakes are gone.
No tests so who knows if it works now. Please someone verify that this works.