* Accept group without entities in configuration.
People seem to use these as placeholders for future expansion of their
home automation dreams, and we used to accept them. We still have to
specify at least one of 'name', 'view' or 'icon' so that the group is
parsed as a dictionary.
* Also accept empty entities: key in a group.
* Additional fix for empty entities value in a group config.
Two tests were invariably grinding my system to a halt as it was
applying migrations to an empty sqlite database. This patch reduces
the time of a pytest run from 50 to about 16 seconds on my desktop.
The difference is even more noticable on a slower laptop drive, but
is probably insignificant for all you fancy SSD users.
Accept delay configuration even when someone forgets to indent the time
specification.
Also removed 'weeks' and 'microseconds' from acceptable delay values.
There is a new homeassistant release every 2 weeks and running scripts
are not persisting across restarts. And there is still the option of
using (weeks*7) days if the long delay is really necessary.
And if someone really depends on microsecond delay precision we are
unlikely to be able to provide this accuracy, even milliseconds is
suspect for that matter but will at least allow us to specify some
subsecond delay.
The Updater component doesn't make much sense on dev versions. If you
want to run a production config with the updater enabled, you end up
with an 'Update Available' badge pointing you to the last release
version. This change disables the Updater component on dev and updates
the tests to use a faked version number.
A warning is emitted if the Updater component is disabled to ensure
there is no confusion.
Also fixes a bug where the test when no payload is given succeeds only
because we run the jinja templating out of memory. Sending an empty
payload instead of trying to fix it through validation for now.
* Service validation for MQTT component.
* Fixes for failing mqtt tests.
- Changed behaviour when both 'payload' and 'payload_template' are provided
instead of silently ignoring the payload_template value.
- Have validation accept any type of payload and leave encoding to paho-mqtt.
* Log error for services called without required attributes, in
media_player, notify and thermostat platforms.
* Add fan property and methods in thermostat demo component.
* Add tests for notify file and thermostat demo component.
* Increase coverage of tests for media_player, notify and thermostat
platforms.
* Fix some PEP issues, but not all. Tests still have old linting
errors.