* Prevent toggle from calling stop on covers which do not support it
* Update homeassistant/components/cover/__init__.py
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* add placeholder support to entity name translation
* add negativ tests
* make property also available via description
* fix doc string in translation_placeholders()
* fix detection of placeholder
* validate placeholders for localized strings
* add test
* Cache translation_placeholders property
* Make translation_placeholders uncondotionally return dict
* Fall back to unsubstituted name in case of mismatch
* Only replace failing translations with English
* Update snapshots
* Blow up on non stable releases
* Fix test
* Update entity.py
---------
Co-authored-by: Erik <erik@montnemery.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Use ServiceValidationError for fan preset_mode
* Use _valid_preset_mode_or_raise to raise
* Move preset_mode validation to entity component
* Fix bond fan and comments
* Fixes baf, fjaraskupan and template
* More integration adjustments
* Add custom components mock and test code
* Make NotValidPresetModeError subclass
* Update homeassistant/components/fan/strings.json
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Keep bond has_action validation
* Move demo test asserts outside context block
* Follow up comment
* Update homeassistant/components/fan/strings.json
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Fix demo tests
* Remove pylint disable
* Remove unreachable code
* Update homeassistant/components/fan/__init__.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Use NotValidPresetModeError, Final methods
* Address comments
* Correct docst
* Follow up comments
* Update homeassistant/components/fan/__init__.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Adds a loader to enable jinja imports.
* Switch to in-memory
* Move loading custom_jinja off of the event loop
* Raise TemplateNotFound if template doesn't exist
* Fix docstring
* Adds a service to reload custom jinja
* Remove IO from test setup
* Improve coverage and small refactor
* Incorporate feedback and use .jinja extension
* Check the loaded sources in test.
* Incorporate PR feedback.
* Update homeassistant/helpers/template.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Allow customizing sensor precision
* Don't convert integer strings to floats
* Tweak converting sensor state to number
* Drop default rounding to 2 decimals
* Adjust test
* Tweak rounding, improve test coverage
* Don't convert to a number if not necessary
* Raise if native_precision is set and state is not numeric
* Address review comments
* Address comments, simplify
* Don't call property twice
* Make exception more helpful
* Add suggested_unit_of_measurement attribute to sensors
* Lazy calculation of initial entity options
* Add type alias for entity options
* Small tweak
* Add tests
* Store suggested_unit_of_measurement in its own option key
* Adapt to renaming of IMPERIAL_SYSTEM
* Fix rebase mistakes
* Apply suggestions from code review
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Add temperature unit conversion to number
* Remove type enforcements
* Lint
* Fix legacy unit_of_measurement
* Address review comments
* Fix unit_of_measurement, improve test coverage
* Add native unit types for weather entities
* Update weatherentity and change precision in climacell test
* Move weather test to demo tests
* Add weather test for temperature conversion
* Add more unit conversion tests
* Remove extra native_ methods
* Remove extra properties and save precision change for another PR
* Remove visibility_unit from metoffice component
The vibility values given by metoffice are formatted into strings,
which means they can't automatically be converted.
* Improve docstrings and convert pressures in forecast
* Add precipitation and wind speed units
* Clean up tests
* Round converted weather values
* Round weather values to 2 decimal places
* Move number of rounding decimal places to constant
* Docstring and styles
* Change existing toggle to add new function
* Fixed using old property method to using actual protected variable.
* Adding service tests to new cover toggle function
* Working on comments from Pull Request 59233
* Adjust existing tests to fit new fake cover setup
* MockCover is calling state method of MockEntity but should call it from CoverEntity
* using different entity to get back test coverage
* Add support for amount and meter sensor state classes
* Ignore last_reset for STATE_CLASS_METER sensors
* Update tests
* Rename STATE_CLASS_METER to STATE_CLASS_AMOUNT_INCREASING
* Rename STATE_CLASS_AMOUNT to STATE_CLASS_TOTAL
* Fix typo
* Log warning if last_reset set together with state_class measurement
* Fix warning message
* Move temperature conversions to entity base class (1/8)
* Update integrations a-c
* Leave old temperature conversion until all integrations are migrated
* tweak
* Use contextlib.suppress
* Remove the MeasurableUnitEntity mixin
* Address comments, add tests
* Fix f-string
* Drop deprecation warning from base entity class
* Update with _attr-shorthand
* Fix rebase mistakes
* Fix additional rebase mistakes
* Only report temperature conversion once
* Fix additional rebase mistakes
* Format homeassistant/components/bbox/sensor.py
* Fix check for overidden _attr_state
* Remove test workarounds from implementation
* Remove useless None-check
* Tweaks
* Migrate new sensors a-c
* Update climacell
* Push deprecation of temperature conversion forward
* Override __repr__ in SensorEntity
* Include native_value in SensorEntity attributes
* Pylint
* Black
* Black
* Fix rebase mistakes
* black
* Fix rebase mistakes
* Revert changes in august/sensor.py
* Revert handling of unit converted restored state
* Apply code review suggestion
* Fix arlo test
* Remove unit from garmin connect
* Remove unit from hvv departures
* Remove device class timestamp from device condition and trigger
* Remove unit from systemmonitor
* Use device class constant for timestamp in ring
* Rewrite smtp unittest tests to pytest style
test functions.
.coverage.rc --> Remove homeassistant/component/smtp/notify.py from
omit section.
test_notify.py --> Convert test case to pytest style.
test.jpg, test.pdf --> Add test files.
Issue id:- #40894
* Made Fix Based On Code Review
To Pull Request - #41720.
.coveragerc --> Add file in omit section as coverage is 75%(i.e. <95%)
test_notify.py --> Capitalize constant in file, Made parametrized data
compatible to avoid if conditions.
Code Review Submission on Pull Request #41720.
* Made Fix Based On Code Review
To Pull Request #41720.
test_notify.py --> Add different test for simple text message to avoid if conditions check in code.
* Move Notify Media Files To
Folder tests/testing_config/notify.
test_notify.py --> Add Relevant Path For .jpg and .pdf file.
test.jpg, test.pdf --> Move to relevant location.
Pull request #41720
* Added missing unit for signal strength
* Added one more unit
* Replaced string with variable
* Fixed wrong import
* Fix import
* Replaced string with variable
* Fixed wrong import
* Apply suggestions from code review
* Black
* Again a fix :-(
* iSort
* iSort after merge
Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
* Implement local media finder and integrate into cast
* update to media source as a platform
* Tweak media source design
* fix websocket and local source
* fix websocket schema
* fix playing media
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add resolve_media websocket
* Register that shit
* Square brackets
* Sign path
* add support for multiple media sources and address PR review
* fix lint
* fix tests from auto whitelisting config/media
* allow specifying a name on the media source
* add tests
* fix for python 3.7
* Apply suggestions from code review
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* add http back to cast and remove guess_type from executor as there is no i/o
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>