* Mysensors nodes can be renamed in the config file
* Replace nodes array with dict. Replace whole name of the node.
* Improved iteration on node names
While waiting for a new pyfoscam release, we can fix this for users
just by changing the import. Foscam devices a pretty widely deployed,
so a regression here is definitely no fun.
Fixes Bug #8940
* Adds support for the Xiaomi Philips LED Ball and Ceiling Lamp
* Documentation url updated.
* New component to .coveragerc added.
* Unused import removed.
* translate labeled as static method.
* Mixed parameters in log message fixed.
* Order of requirements_all.txt fixed.
* Plattform updated. It's async now.
* Simplifiable if-statement fixed.
* Some more clean-up of unneeded stuff.
* Platform schema updated.
* Component is called xiaomi_philipslight now.
* Requirements all updated.
* Initialization of some variables updated.
* Raise PlatformNotReady exception if light cannot be discovered.
* Import of math removed.
Missing space added.
* Remove unnecessary updates
* Refactor mysensors callback and add validation
* Add mysensors entity class. The mysensors entity class inherits from
a more general mysensors device class.
* Extract mysensors name function.
* Add setup_mysensors_platform for mysensors platforms.
* Add mysensors const schemas.
* Update mysensors callback and add child validation.
* Remove gateway wrapper class.
* Add better logging for mysensors callback.
* Add discover_persistent_devices function.
* Remove discovery in mysensors component setup.
* Clean up gateway storage in hass.data.
* Update all mysensors platforms.
* Add repr for MySensorsNotificationDevice.
* Fix bug in mysensors climate target temperatures.
* Clean up platforms. Child validation simplifies assumptions in
platforms.
* Remove not needed try except statements. All messages are validated
already in pymysensors.
* Clean up logging.
* Add timer debug logging if callback is slow.
* Upgrade pymysensors to 0.11.0.
* Make dispatch callback async
* Pass tuple device_args and optional add_devices
* Also return new_devices as list instead of dictionary.
* Emulate set_current_position in cover.template
* Add opportunistic mode
* Prevent another move when cover is already moving. Add tests for opotunistic/timed-delay mode
* Remove timed-move capabilities
* Set init state to unknown
* cleanup template
* Update test_template.py
* Simplisafe unknown status fix
Changed simplisafe-python requirement to 1.0.5 and changed state return
case statements to lower case
* Bump requirements_all.txt
* cast strings to integers for hsv_to_rgb conversion, fixes#6473
* remove type_checking, flake8 does not like that.
* use hsv_to_rgb to convert to correct rgb value
* Support changing the bulb color for tplink smartbulbs, related to #8766
* existence of ATTR_RGB_COLOR in kwargs, not just its existence...
* return modified supported features
* rgb-hsv conversion utils from hass return bogus values (at least for this device), so doing conversions directly with colorsys
* add typing & documentation for color model conversions
* make linters happy
* cast hsv to integer before passing it to the backend library
* make sure the bulb is on before adjusting the other settings
* allow floats as inputs for conversions, return always integers
* use typing hint in the parameter list instead of at assignment
* do not assign local color state inside turn_on, but let update handle doing it
* use forward declaration for typing, fixes travis requirements build hopefully
* rename hsv and rgb
* remove type-checking check, forward declarations should work just fine without it
* disable (broken) pylint warnings, these can be removed after astroid is updated from 1.4.9 to 1.5
* Pilight switch: restore last state after restart
This uses the restore_state helper to set the last known state to
pilight switches when the devices are initialized after a HA
restart.
Without this HA forget the state on every restart and needs to be told
the sttae by retoggling the switches. This can cause unwanted effects
as a switch toggling may emit an RF signal.
* Make hound happy
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
* Remove entity_id generation as requested in review.
* Make hound happy again.
* fix comments
* fix lint
* Add support for offset for the workday sensor
* Update tests for workday sensor
* Changed from 'offset' to 'days_offset'
* Attributes bugfix (dictionary key variable repeated with different values)
* Add support for Prowl notifications.
* Use HA session handler.
* Simplify http request logic.
* flake
* fix double fetch data
* Remove periods from log messages
* Get full multizone state during registration
We used to rely on the periodic update to get the state of each zone, only
establishing the number of zones during registration. This resulted in errors
if the current state was needed for a partial color change before the first
async_update happened.
Now we do a full update before adding the light. Thus async_update can no
longer assume device.color_zones to be defined and must instead use the
response message to decide the total number of zones.
* Insist on getting the initial state
If a response to the initial state query is lost we used to just carry on.
This resulted in type errors when we next tried to access the undefined state.
After this commit the light is not added before we have the full state.
This scenario mostly happens when something is misbehaving and the type errors
were actually useful in figuring out what happend. So an error message is
logged in their place.
* Remove lint
* Update fitbit.py
Add variable icon for battery status, clean up formatting for resource
names and values
* Update fitbit.py and requirements_all.txt
Fix PR comments and update client
* Update fitbit.py
Add dict map for battery levels and use icon util
* Update ios.py
Clean up battery and charging icons (MDI was missing some versions),
fix minor bug when battery level = 95%
* Update ios.py
Migrated function to battery icon util
* Inital USPS Camera expansion
* Cleanup debugging, add camera change interval
* Change to local nomail image
* Explicitly pass in date
* Move camera date info to model property
* Fix copy typo
* Fix hound line-length
* Fix lint whitespace
* Fix requirements
* Bump myusps version, clarify interval, alter update scheme
* Add units
* Code cleanup, address comments
* Use built-in scan interval, remove nomail image
* Remove logging line
* Add HipChat notify service.
* Change HipChat notify service to use python-simple-hipchat-v2.
* Change HipChat notify service to use hipnotify
* Change HipChat notify service to remove redundant validation
* Update to pyenvisalink 2.2, and remove range validation on zonedump interval.
* Keep using default timer dump variable, only remove minimum check.
* Fix lint issue
* Indentation issue
* Add support for Automatic OAuth2 authentication
* Fix async conversion of configurator
* Rename method for async
* Use hass.components to get configurator component
* Fix typo
* Move session data to hidden directory
* Make configurator callback optional
* Fixed cert_expiry sensor to delay firing on HA startup
* Addressed Travis complaints
* Added imports
* Fixed cert_expiry sensor to delay firing on HA startup
* Changed comment
* Added possibilities to use template in the command_line sensor
* Minor style guideline conforms
* Minor style guideline conforms
* Added new test for template rendering
* Minor style guideline conforms
* Minor style guideline conforms
* Fixed failing testcases
* Fix style violations
* fix code pretty
* Add new device tracker for Huawei Routers.
This was tested with the HG8247H model, used by Vodafone
Portugal for the Fiber service.
* add to .coveragerc; remove import and space
* add comments and fix lint
* rename methods
* huawei_router: add constants to scanner class
* huawei_router: remove lock; use format() in string
* huawei_router: use tupple instead of member only class
* huawei_router: reduce min scan time
* huawei_router: lint
* huawei_router: lint
* huawei_router: add missing lines in imports
* huawei_router: correctly decode string after router firmware update
* Remove things that is done on core now
* LIFX: improve performance of multi-light transitions
To avoid hub overload, the light.turn_on call will change each light
sequentially.
As LIFX has no hub we can safely increase performance by starting all
light transitions concurrently.
* Improve state updates after light changes
The light.turn_on call will set a new state and then immediately read it
back. However, reading the state of a LIFX light right after a state
change can still return the old value.
To handle this situation we have previously delayed the update request a
little while to allow a potential state change to settle. Because light
updates are now run in parallel, this delay might be too short when many
lights are set at once.
This commit introduces a per-light Lock to make it explicit when the
state cannot yet be trusted.
We must then do the state update ourselves. This was already done at the
end of a long transition and that code can be reused for also doing the
update at the start of a transition.
* Add RainMachine switch platform
* Updated requirements_all.txt
* Cleaning up CI and coverage results
* Small update to deal with older pylint
* Fixed small indentation-based error
* Added some more defensive try/except logic around calls
* I'm not a fan of importing a library multiple times :)
* Making PR-requested changes
* Fixed ref to positional parameter
* Attempting to fix broken linting
* Ignoring no-value-for-parameter pylint error
* Implement Roomba fanspeed
* Fix: fan_speed_list is always empty
* Log instead of raising an exception when incorrect fan speed has been provided
* Don't attempt to set any preference if fan speed is invalid
* Initial implementation of Asterisk Mailbox
* Rework asterisk_mbox handler to avoid using the hass.data hash. Fix requirements.
* Handle potential asterisk server disconnect. bump asterisk_mbox requirement to 0.4.0
* Use async method for mp3 fetch from server
* Add http as dependency
* Minor log fix. try to force Travis to rebuild
* Updates based on review
* Fix error handling as per review
* Fix error handling as per review
* Refactor voicemail into mailbox component
* Hide mailbox component from front page
* Add demo for mailbox
* Add tests for mailbox
* Remove asterisk_mbox sensor and replace with a generic mailbox sensor
* Fix linting errors
* Remove mailbox sensor. Remove demo.mp3. Split entity from platform object.
* Update mailbox test
* Update mailbox test
* Use events to indicate state change rather than entity last-updated
* Make mailbox platform calls async. Fix other review concerns
* Rewrite mailbox tests to live at root level and be async. Fixmailbox dependency on http
* Only store number of messages not content in mailbox entity
* Add new service `clean_spot` to vacuums
- Add as base component service, with associated support flag to make it optional
- Implement on Demo vacuum
- Implement on Xiaomi vacuum
- Update tests for platforms Demo and Xiaomi
- Change default icon for vacuums to `mdi:roomba`, but keep the one for the Xiaomi
- (In a polymer PR: add new service to command toolbar in the 'more-info' card)
* Add `clean_spot` service description
* fix default properties for vacuum component
* Do not use pychromecast.Chromecast for Cast Groups
pychromecast.Chromecast creates Chromecast instance with friendly_name and cast_type of the device and not of a group.
Which leads to collisions
* Update cast.py
* using hass.data
* Fixed and extended tests
* Line length in tests
* Lint in tests
* Added support for Egardia / Woonveilig alarm control panel
* Added support for Egardia / Woonveilig alarm control panel
* Added support for Egardia / Woonveilig alarms
* Updating egardia support with exception handling and other fixes
* Egardia platform, requirements file updated
* Fixing state checking
* Adding exception handling
* Removing unnecessary logging
* Removing unnecessary logging
* Updating to egardiadevice component 1.0.10
* Improving exception handling
* Adding implementation of egardiaserver for alarm triggered status
* Clean-up
* Fix my previous change
* Fix tests for Demo vacuum platform (and increase coverage)
* increase coverage of xiaomi vacuum tests and include in coverage
Also little fixes
* remove print statement
* Add DEBUG-level log for db row to native object conversion
This is now the bottleneck (by a large margin) for big history queries, so I'm leaving this log feature in to help diagnose users with a slow history page
* Rewrite of the "first synthetic datapoint" query for multiple entities
The old method was written in a manner that prevented an index from being used in the inner-most GROUP BY statement, causing massive performance issues especially when querying for a large time period.
The new query does have one material change that will cause it to return different results than before: instead of using max(state_id) to get the latest entry, we now get the max(last_updated). This is more appropriate (primary key should not be assumed to be in order of event firing) and allows an index to be used on the inner-most query. I added another JOIN layer to account for cases where there are two entries on the exact same `last_created` for a given entity. In this case we do use `state_id` as a tiebreaker.
For performance reasons the domain filters were also moved to the outermost query, as it's way more efficient to do it there than on the innermost query as before (due to indexing with GROUP BY problems)
The result is a query that only needs to do a filesort on the final result set, which will only be as many rows as there are entities.
* Remove the ORDER BY entity_id when fetching states, and add logging
Having this ORDER BY in the query prevents it from using an index due to the range filter, so it has been removed.
We already do a `groupby` in the `states_to_json` method which accomplishes exactly what the ORDER BY in the query was trying to do anyway, so this change causes no functional difference.
Also added DEBUG-level logging to allow diagnosing a user's slow history page.
* Add DEBUG-level logging for the synthetic-first-datapoint query
For diagnosing a user's slow history page
* Missed a couple instances of `created` that should be `last_updated`
* Remove `entity_id` sorting from state_changes; match significant_update
This is the same change as 09b3498f41 , but applied to the `state_changes_during_period` method which I missed before. This should give the same performance boost to the history sensor component!
* Bugfix in History query used for History Sensor
The date filter was using a different column for the upper and lower bounds. It would work, but it would be slow!
* Update Recorder purge script to use more appropriate columns
Two reasons: 1. the `created` column's meaning is fairly arbitrary and does not represent when an event or state change actually ocurred. It seems more correct to purge based on the event date than the time the database row was written.
2. The new columns are indexed, which will speed up this purge script by orders of magnitude
* Updating db model to match new query optimizations
A few things here: 1. New schema version with a new index and several removed indexes
2. A new method in the migration script to drop old indexes
3. Added an INFO-level log message when a new index will be added, as this can take quite some time on a Raspberry Pi