* Adding sensor for SolarEdge Monitoring API support
* Adding support for Rova garbage calendar
* Added Rova platform to retrieve garbage pickup times
* Update async to new syntax
Added async_update to sensor class
Added Throttle to Rova update function
Minor code style changes
* Small style fixes
* Removed domain
* Update debug to error messages
Change CONF_MONITORED_VARIABLES to CONF_MONITORED_CONDITIONS
Update async update call to normal update
* Update requirements to rova v0.0.2
Add address check to see if ROVA collects in the given area
* Rename entity names to English
Add json_key to Sensor entities
* Add device_class to the RovaSensor
* Fix pylint and flake8 messages
* Add check for None in case collection date is unknown
* Return device class constant
* New Transmission component and interaction
First commit for New Transmission component and interaction
* Fix commit
* Fix commit
* Fix + Switch checkin
Fix according to failed build and request, first checkin for Turtle Mode Switch in Transmission, still have to figure it out why it's not working.
* Bugfixing
* Fix commit
Multiple fix
* Fix
* fix for missing config
* Update on requirements_all.txt
* Fix in requirements_all.txt
* Fix
* Fix for build
* fix
* Fix
* Fix (again)
* Fix
* Fix indentation
* Fix indentation
* Fix Throttle
* Update .coveragerc
* Fix import and coveragerc
* Added Recollect Waste Curbside Collection sensor for tracking next collection date and for which types of waste.
* Added missing schema attributes.
* Adding requirements and coverage entries for Recollect Waste platform.
* Added exception handling, some other fixes and suggestions from code review.
* Fixed reference to incorrect exception type.
* Updated requirements_all.txt with new version of recollect-waste.
* Added true to add_entities. Created constant for default time interval. Used different pylint exclusion comment.
* Using HA's CONF_SCAN_INTERVAL now. Unique_id is now set in @property.
* Changed parameter of timedelta from seconds to days.
* Added test run of recollect client during setup_platform. Using built in SCAN_INTERVAL now.
* Return nothing in setup_platform if there is an exception.
* Moving existing sensor file
* Initial functionality in place
* Added test for config flow
* Updated coverage and CODEOWNERS
* Linting
* Linting
* Member comments
* Hound
* Moving socket disconnect on HASS stop
* Member comments
* Removed unnecessary dispatcher call
* Config entry fix
* Added support in config flow for good accounts with no devices
* Hound
* Updated comment
* Member comments
* Stale docstrings
* Stale docstring
* Reset the incident types count every day
* Remove functionality that was never implemented
We don't need to keep track of previous incidents because it's not used
anywhere.
* Create empty dictionary with a pair of braces: {}
* Split out dovado to a component and sensor platform
* Lint
* Address code review comments (#20339)
* Switch to using a notify platform for dovado SMS (#20339)
* Optimizing imports
* Remove return on `setup_platform`.
* Clean up unneeded constants
* Starting work on ecoal boiler controller iface.
* Sending some values/states to controller.
* Basic status parsing, and simple settings.
* Platform configuration.
* Temp sensors seems be working.
* Switch from separate h/m/s to datetime.
* Vocabulary updates.
* secondary_central_heating_pump -> central_heating_pump2
* Pumps as switches.
* Optional enabling pumps via config.
* requests==2.20.1 added to REQUIREMENTS.
* Optional enabling temp sensors from configuration yaml.
* autopep8, black, pylint.
* flake8.
* pydocstyle
* All style checkers again.
* requests==2.20.1 required by homeassistant.components.sensor.ecoal_boiler.
* Verify / set switches in update().
Code cleanup.
* script/lint + travis issues.
* Cleanup, imperative mood.
* pylint, travis.
* Updated .coveragerc.
* Using configuration consts from homeassistant.const
* typo.
* Replace global ECOAL_CONTR with hass.data[DATA_ECOAL_BOILER].
Remove requests from REQUIREMENTS.
* Killed .update()/reread_update() in Entities __init__()s.
Removed debug/comments.
* Removed debug/comments.
* script/lint fixes.
* script/gen_requirements_all.py run.
* Travis fixes.
* Configuration now validated.
* Split controller code to separate package.
* Replace in module docs with link to https://home-assistant.io .
* Correct component module path in .coveragerc.
More vals from const.py.
Use dict[key] for required config keys.
Check if credentials are correct during component setup.
Renamed add_devices to add_entities.
* Sensor/switch depends on ecoal_boiler component.
EcoalSwitch inherits from SwitchDevice.
Killed same as default should_poll().
Remove not neede schedule_update_ha_state() calls from turn_on/off.
* lint fixes.
* Move sensors/switches configuration to component setup.
* Lint fixes.
* Invalidating ecoal iface cache instead of force read in turn_on/off().
* Fail component setup before adding any platform entities.
Kill NOTE.
* Disallow setting entity names from config file, use code defined default names.
* Rework configuration file to use monitored_conditions like in rainmachine component.
* Killed pylint exception.
Log error when connection to controller fails.
* A few fixes.
* Linted.
* Added Search Configuration to IMAP Sensor
The IMAP sensor currently only counts unread emails in a folder. By exposing the IMAP search parameter, the sensor can be used to count other results:
- All emails in an inbox
- Emails sent from an address
- Emails matching a subject
- Other advanced searches, especially with vendor-specific extensions. Gmail in particular supports X-GM-RAW, which lets you use any Gmail search directly ("emails with X label older than 14 days with", etc)
For my use case, I just wanted total emails in a folder, to show an "X/Y" counter for total/unread. I started work on a one-off script to throw the data in, but figured I'd try to extend Home Assistant more directly, especially since this IMAP sensor correctly handles servers that push data. This is my first Home Assistant contribution, so apologies in advance if something is out of place! It's a pretty minimal modification.
* Added Server Response Checking
Looks like no library exception is thrown, so check for response text before parsing out results (previous code just counts spaces, so an error actually returns a state value of 4).
* IMAP Warning -> Error, Count Initializes to None
IMAP search response parsing throws an error instead of a warning.
Email count initializes as None instead 0.
Email count is untouched in case of failure to parse response (i.e. if server is temporarily down or throwing errors, or maybe due to user updating their authentication/login/etc).
Fixed line length on error so it fits under 80 characters.
* Fixed Indent on Logger Error
Sorry about the churn! Python is pretty far from my daily-use language. (I did run this one through pep8, at least)
The previous symbol used for degrees was U+00BA, the "Masculine Ordinal Indicator". This patch changes the symbol to U+00B0, "Degree Sign", to match the rest of the Home Assistant system.
The battery level sensor is broken because the logic for determining
if the battery is charged accessed the wrong variable. This one
character fix makes it work again.
* Preparing for transition to config flow
Added multiple gateway support
Reworked parameter flow to platforms to enable multiple controllers
Breaking change to config, now a list of gateways is expected instead of a single config
* Updated coveragerc
Added new location of fibaro component
* Fixes based on code review and extended logging
Addressed issues raised by code review
Added extended debug logging to get better reports from users if the device type mapping is not perfect
* Changhes based on code review
Changes to how configuration is read and schemas
Fix to device type mapping logic
* simplified reading config
* oops
oops
* grr
grr
* change based on code review
* changes based on code review
changes based on code review
* Change state() to try/except to catch KeyError
When Tautulli is up but Plex is down, the API doesn't return a 'stream_count' key. This causes calls to state() to raise KeyError exceptions. The new code includes a try/except to catch the KeyError and return -1 signifying that the Tautulli API cannot talk to Plex
* Update tautulli.py
* Initial pass of cleanup for shabbat_times
* Switch to async defs
* First pass of unit tests + fixture data
* Completion of first round of unit tests, 100% passing
* Unit tests for state restoring
* Style fixes
* More style fixes
* Lint fix
* Add upcoming candelighting and havdalah sensors
* Add unit tests, remove havdalah offset
* More unit tests + small bugfix for weekly_portion
* Add issur melacha sensor
* Remove old shabbat_times work-in-progress files
* Bump required version of hdate
* Add havdalah offset config parameter
* Bump hdate version required
* Pin hdate requirement
* Lint fixes
* Changes based on review + API changes for hdate 0.8.7
* Add three-day holiday unit tests
* Remove debugging line
* Add missing docstring
* Fix doc lint comment
* Dont load if not in config
* Adding config options for sensors
* Fixed mistake with iterating over wrong things
* lint
* lint
* Setting None state
* Using .get when fetching optional config
The mychevy service is notoriously unreliable, often only having 50% uptime.
Previously a persistent notification was emitted when the platform errored out.
Users have found that is happening too often, so instead log an error when
this happens instead.
* awair: do not choke on no data
The awair API returns an empty response for various air data queries
when a device is offline. The underlying library (python_awair) does
not directly inform us that a device is offline, since we really can
only infer it from an empty response - there is no online/offline
indicator in the graphql API.
So - we should just ensure that we do not attempt to update device state
from an empty response. This ensures that the platform does not crash
when starting up with offline devices, and also ensures that the
platform is marked unavailable once devices go offline.
* Fix typo
Further proof that coding after 10pm is rolling the dice.
* Update pylaunches dependency to 0.2.0
Update launch library to use pylaunches 0.2.0 as a dependency. launch_time sensor attribute will now be passed in ISO format, allowing for templating/easier automating with this attribute.
* Update pylaunches to 0.2.0
* add hub- and device-info
* attempt to make I/O outside event loop
* add_executer_job
* coroutines
* async_get_hubs
Co-Authored-By: fredrike <fredrik.e@gmail.com>
* asyncio fixes
* do device_info IO when device is discovered
* it's called async_add_executor_job
* nicer unique_id
* add comment
* it's called `async_add_executor_job`
* hub always contains 'name'
* await each new device
* add comment to why gather is bad
* Remove timer logic from sensor class
Proposed fix for issue #10500
* Updating the tests to remove timer logic
* Removing unecessary dependancy
* Fixing requested changes
* Commit to try to fix the CLA ?
* Disable creating port mappings from UI, add discovery from component
* Remove unused constant
* Upgrade to async_upnp_client==0.13.6 and use manufacturer from device
* Upgrade to async_upnp_client==0.13.7
In HomeAssistant 0.84.3, the range filter would not work due to the unexpected precision filter parameter.
The default range scheme has been edited to remove the unexpected precision parameter.
Verified and tested.
* added new sensor platform to expose Islamic prayer times
* added new sensor platform to expose Islamic prayer times
* updated tests according to feedback
* make prayer_times_info a public attribute
* remove stale comments
* Implement async_configure() method for ZHA entities.
Allow attribute reporting configuration to be stored as dict of zha
entity.
* Update ZHA platform to use new attribute reporting configuration.
* Use const declaration instead of magic numbers.
* Add support for manufacturer_id in ZCL attribute reporting configuration.
* Refactor async_configure() method.
Rename attribute reporting dict to zcl_reporting_config.
* Adding sensor for SolarEdge Monitoring API support
* Adding support for Rova garbage calendar
* Update solaredge to pass lint and flake8
* Added solaredge.py to .coveragerc
* Added extend for Voluptuous schema
* Fixed styling issues
* Removed rova.py for later feature
* Replaced API requests with python pip package
* Fixed styling issues
* Updated to new async syntax
Added async_update to sensor class
Added Throttle to SolarEdge data update
Added CONF_NAME to platform settings
Added credentials check for api
Minor code style changes
* Remove unnecessary debug logging
* Updated dict keys
* Added SCAN_INTERVAL
Updated platform setup
* Remove DOMAIN variable
Correct import for PLATFORM_SCHEMA
* Change some debug to error messages
Correct return statements
Remove initial update call
* Fix pylint and flake8 errors
* complete(?)
* fixed linting
* update requirements
* added to coveragerc
* fixed linting
* added ability to set custom name
* fixed linting
* added filter
* spacing
* Added list of possible fuels
* Minor updates
In HomeAssistant 0.84.3, the range filter would not work due to the unexpected precision filter parameter.
The default range scheme has been edited to remove the unexpected precision parameter.
Verified and tested.
* added gtt sensor
* removed trailing space
* updated requirements_all
* fixed two errors in the code style
* fixed imperative in docstring
* disabled pylint false positive
* fixed description on top of the file
* added files to .coveragerc
* fixes
* linting
* fixed linting 👍
* left a trailing space, now it's gone.
* fix
* Provide charging indicator for mychevy
This expands the mychevy sensor for the battery level to also know if
the system is currently charging to get the correct icon.
* address review feedback
* Added brottsplatskartan sensor
* Update brottsplatskartan sensor
* Remove redundant configuration checks.
* Set attributes during initialization.
* Setup brottsplatskartan module in setup_platform().
* Just do a simple return, no need for returning false.
* Remove file that was used during testing
* Better variable name and remove excessive newline.
* More updates to brottsplatskartan
* Import uuid at the top of the module.
* Use sensor as domain.
* Don't fire custom events.
* Remove period from logging message.
* Adding validation for area parameter
* Validate empty area configuration
* Fixing indentation.
* Fixing the config schema
* Adding ambient_station.py sensor and updating requirements file
* Cleaning up code and fixing flake8 warnings
* Fixing flake8 and pylint warnings
* Adding ambient_station.py sensor and updating requirements file
* Cleaning up code and fixing flake8 warnings
* Fixing flake8 and pylint warnings
* Fixing bug, things are working well now
* removing nosetests file
* Adding changes as requested in pull request #18551
* Updating with more change requests from PR code review
* Removing SCAN_INTERVAL from PLATFORM_SCHEMA
* Removing unused import
* Adding platform schema validation for monitored_conditions and conf_units
* Updating link to documentation in doc-string. File already named in doc repo
* Only setup platform if component can successfully communicate with API
* Inverting check for platform setup success
* Add custom component to core
* Add pyrail to reqs
* Format & lint
* Sort nmbs.py into place on coveragerc
* Only set up station live if provided
* Only set up sensor if config is provided
* Fix line too long linting error
* PR Remarks
* Add docstrings
* Fix hound line to long error
* Fix quotes
* Rebase coveragerc
* PR Review
* Init empty attrs
* Dont include delay if there is none
* PR review
* Safer check
* Rebase reqs
* Generate req
* Update homeassistant/components/sensor/nmbs.py
Co-Authored-By: thibmaek <thibault.maekelbergh@iCloud.com>
* PR remarks
This works by adding `?check_same_thread=False` to the sqlite
connection string, as suggested by robbiet480@.
It upgrades pygtfs from homeassitant's forked 0.1.3 version to 0.1.5.
Fixes#15725
* Automatically detect if ipv4/ipv6 is used for cert_expiry
Fixes#18818
Python sockets use ipv4 per default. If the domain which should be checked
only has an ipv6 record, socket creation errors out with
`[Errno -2] Name or service not known`
This fix tries to guess the protocol family and creates the socket
with the correct family type
* Fix line length violation
* move component to a package
* move TelldusLiveEntry to separate file
* refactor
* move entities from a shared container
* using the dispatch helper instead for communication between component and platforms
* updated covereagerc and codeowners
* suggestions from MartinHjelmare
* don't make update async
* "Strip is good!"
* netatmo: make module type identification more consistent
For the interpretation of voltage values the different types of netatmo
modules need to be distinguished. This is currently done by selecting
the second character of the modules '_id'. The _id-field actually
contains a mac address. This is an undocumented way of identifying the
module_type.
The netatmo API also delivers a field called 'type' which provides a
more consistent way to differentiate the fields. This commit introduces
a differentiation which uses this provided type. This should improve
readability.
Also the field module_id is renamed to module_type which should better
resemble what it actually represents.
* netatmo: reintroduce unique_id using actual module mac address
Each netatmo module features a unique MAC-Address. The base station uses
an actual assigned MAC Address it also uses on the Wifi it connects to.
All other modules have unique MAC Addresses which are only assigned and
used by Netatmo on the internal Wireless-Network. All theses Addresses
are exposed via the API. So we could use the combination
MAC-Address-Sensor_type as unique_id.
In a previous commit this had already been tried but there was a
misunderstanding in what the 'module_id' represented. It was actually
only a module_type representation so it clashed when two modules of the
same type where used.
* Netatmo: fixed line length
* Added Entur departure information sensor.
* Fixed houndci-bot comments.
* Removed tailing whitespace.
* Fixed some comments from tox lint.
* Improved docstring, i think.
* Fix for C1801
* Unit test for entur platform setup
* Rewritten entur component to have pypi dependecy.
* Propper client id for api usage.
* Minor cleanup of usage of constants.
* Made location output configurable.
* Cleaned up usage of constants.
* Moved logic to be contained within setup or update methods.
* Moved icon consts to root in module.
* Using config directly in test
* Minor changes
Add the following sensors that provide interesting data when using a variable speed geothermal system:
* Compressor Power
* Fan Power
* Aux Power
* Loop Pump Power
* Compressor Speed
* Fan Speed
* Fix statistics for binary sensor
-) Binary sensors have 'on' and 'off' for state resulting in issue as numbers were expected. Fixed so that it works with non-numeric states as well.
-) Added check to skip unknown states.
-) Updates test so that binary sensor test will use non-numeric values for states.
* Using guard clause and changed debug to error
Changed to use a guard clause for state unknown.
Writing error on value error instead of debug.
* Add docstring
* Restore states through a JSON store
* Accept entity_id directly in restore state helper
* Keep states stored between runs for a limited time
* Remove warning
* Awair Sensor Platform
This commit adds a sensor platform for Awair devices, by accessing
their beta API. Awair heavily rate-limits this API, so we throttle
updates based on the number of devices found. We also allow for the
user to bypass API device listing entirely, because the device list
endpoint is limited to only 6 calls per day. A crashing or restarting
server would quickly hit that limit.
This sensor platform uses the python_awair library (also written
as part of this PR), which is available for async usage.
* Disable pylint warning for broad try/catch
It's true that this is generally not a great idea, but we really don't
want to crash here. If we can't set up the platform, logging it and
continuing is the right answer.
* Add space to satisfy the linter
* Awair platform PR feedback
- Bump python_awair to 0.0.2, which has support for more granular exceptions
- Ensure we have python_awair available in test
- Raise PlatformNotReady if we can't set up Awair
- Make the 'Awair score' its own sensor, rather than exposing it other ways
- Set the platform up as polling, and set a sensible default
- Pass in throttling parameters to the underlying data class, rather
than use hacky global variable access to dynamically set the interval
- Switch to dict access for required variables
- Use pytest coroutines, set up components via async_setup_component,
and test/modify/assert in generally better ways
- Commit test data as fixtures
* Awair PR feedback, volume 2
- Don't force updates in test, instead modify time itself and let
homeassistant update things "normally".
- Remove unneeded polling attribute
- Rename timestamp attribute to 'last_api_update', to better reflect
that it is the timestamp of the last time the Awair API servers
received data from this device.
- Use that attribute to flag the component as unavailable when data
is stale. My own Awair device periodically goes offline and it really
hardly indicates that at all.
- Dynamically set fixture timestamps to the test run utcnow() value,
so that we don't have to worry about ancient timestamps in tests
blowing up down the line.
- Don't assert on entities directly, for the most part. Find desired
attributes in ... the attributes dict.
* Patch an instance of utcnow I overlooked
* Switch to using a context manager for timestream modification
Honestly, it's just a lot easier to keep track of patches. Moreover,
the ones I seem to have missed are now caught, and tests seem to
consistently pass.
Also, switch test_throttle_async_update to manipulating time more
explicitly.
* Missing blank line, thank you hound
* Fix pydocstyle error
I very much need to set up a script to do this quickly w/o tox, because
running flake8 is not enough!
* PR feedback
* PR feedback
* Added Fibaro omcponents
Added cover, light, sensor and switch components
* Improvements based on code review
Improvements based on code review
* Fixes based on code review
Fixes based on code review
* Changes to light behavior based on code review
Changes to light behavior based on code review
* Internal changes
Changed how brightness is represented internally.
It should have no impact on functionality.
Dark Sky Sensor didn't expose conditions for day 0 (today forecast) that
had the same name as current conditions. With this change all conditions
form day 0 (today) forecast are exposed the same way as conditions for
the rest of the days (1..7): as `dark_sky_<condition>_<day>`. As a
consequence, conditions for day 0 that were already exposed now have
`_0` suffix. This actually improves the code by removing most of
special handling, based on condition name.
To get day 0 conditions the user now has to add `- 0` to `forecast`
configuration parameter.
Conditions, for which suffix `_0` appeared: `precip_accumulation`,
`temperature_high`, `temperature_low`, `apparent_temperature_high`,
`apparent_temperature_low`, `precip_intensity_max`, `moon_phase`.
This is a breaking change!
Closes#18205