epenet
a236836796
Fix typo in helper docstring ( #82824 )
2022-11-28 09:15:16 +01:00
Erik Montnemery
35dbc3151a
Fix docstring for entity helper ( #82704 )
...
Fix some language in entity.py
2022-11-25 18:20:33 +01:00
epenet
0a4549e202
Add callback to SchemaFlowFormStep for suggested_values ( #82706 )
...
* Allow callback for suggested_values
* docstring
2022-11-25 16:38:58 +01:00
Erik Montnemery
e9ce08763c
Allow SchemaFlowFormStep.next_step to return None ( #82707 )
2022-11-25 16:00:26 +01:00
epenet
fcba9974e5
Rename options to suggested_values ( #82700 )
2022-11-25 14:40:20 +01:00
epenet
6c615016b8
Fix None schema in SchemaCommonFlowHandler ( #82699 )
2022-11-25 14:30:02 +01:00
Franck Nijhof
c715035016
Add support for raising ConfigEntryError ( #82689 )
2022-11-25 11:33:03 +01:00
epenet
9feb64cebd
Simplify schema callback in SchemaFlowFormStep ( #82682 )
...
* Simplify SchemaFlowFormStep.schema callback
* Expose parent handler
* Adjust docstrings
2022-11-25 10:50:38 +01:00
epenet
a4dbb9a24e
Add handler to validate_user_input ( #82681 )
...
* Add handler to validate_user_input
* Adjust group config flow
2022-11-25 09:29:54 +01:00
Erik Montnemery
e1338adf1a
Allow configuring country and language in core config ( #81734 )
...
* Allow configuring country and language in core config
* Add script for updating list of countries
* Use black for formatting
* Fix quoting
* Move country codes to a separate file
* Address review comments
* Add generated/countries.py
* Get default language from owner account
* Remove unused variable
* Add script to generate list of supported languages
* Add tests
* Fix stale docsring
* Use format_python_namespace
* Correct async_user_store
* Improve typing
* Fix with_store decorator
* Initialize language in core store migration
* Fix startup
* Tweak
* Apply suggestions from code review
Co-authored-by: Franck Nijhof <git@frenck.dev>
* Update storage.py
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-11-24 23:25:50 +01:00
G Johansson
6cb004b770
Selector for SingleEntitySelectorConfig allow domain to be a list ( #82666 )
2022-11-24 22:34:39 +01:00
epenet
9f9114cb4a
Simplify SchemaFlowStep typing ( #82661 )
...
* Simplify SchemaFlowStep typing
* Adjust accuweather
2022-11-24 21:59:41 +01:00
Erik Montnemery
978122c882
Fix docstring in SchemaFlowFormStep ( #82612 )
2022-11-24 20:30:23 +01:00
epenet
9132c42037
Improve Selector typing ( #82636 )
2022-11-24 19:27:26 +01:00
epenet
caa99ea9fb
Allow next_step to be a string ( #82647 )
...
* Allow next_step to be a string
* Adjust docstrings
* Add test
2022-11-24 18:55:53 +01:00
Erik Montnemery
8577310e6d
Fix show_menu support in SchemaFlowFormStep ( #82634 )
...
* Fix show_menu support in SchemaFlowFormStep
* Add test
* Fix test
2022-11-24 17:30:01 +01:00
epenet
e386bab682
Add type hint to template wrapper ( #82563 )
...
* Add type to template hassfunction decorator
* Adjust to use EvalContext
* Use runtime.Context
* Use TypeVar for context
* Use jinja2.runtime.Context
* Reverse declarations
* Use Any
* Update homeassistant/helpers/template.py
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2022-11-24 15:30:21 +01:00
epenet
a856abf47f
Make async_options_flow_finished optional ( #82615 )
...
* Make async_options_flow_finished optional
* Adjust docstring
2022-11-24 14:43:40 +01:00
epenet
ba18571cbe
Set last_step in SchemaCommonFlowHandler ( #82616 )
...
* Set last_step in SchemaCommonFlowHandler
* Always use boolean
* Adjust next_step definition
2022-11-24 14:37:55 +01:00
epenet
4c38a5d773
Add OptionsFlow helper class ( #82531 )
...
* Add OptionsFlow helper classes
* More integrations
* Adjust SchemaOptionsFlowHandler
* Use single class
* Simplify access to options
* Reduce PR
* Make _options private
* Add test
2022-11-24 12:18:09 +01:00
epenet
b525259878
Add type hints to template result wrapper ( #82575 )
...
* Add type hints to template result wrapper
* Remove `ignore[call-arg]`
* Use tuple
* Alphabetise
2022-11-24 08:41:14 +01:00
On Freund
9dd1b85cbb
Allow device_attr
and is_device_attr
to be used as a filter and a test (respectively) ( #81924 )
...
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2022-11-24 08:31:17 +01:00
epenet
d7f0b904d0
Add type to template function ( #82564 )
2022-11-23 21:50:45 +01:00
epenet
f91e250e90
Fix TemplateError definition ( #82570 )
2022-11-23 20:30:32 +01:00
Jan Bouwhuis
23bc39b7f4
Add type hints on Template().__init__()
( #82574 )
2022-11-23 20:26:55 +01:00
epenet
aa02a53ac6
Add type hints to template states ( #82582 )
...
* Add type hints to template states
* Undo rename
* Remove invalid mypy issue link
2022-11-23 17:46:51 +01:00
epenet
687d162a94
Fix incorrect type hint in SchemaOptionsFlow ( #82516 )
2022-11-22 12:45:35 +01:00
epenet
9d192643ee
Move PluggableAction to trigger helpers ( #81900 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Joakim Plate <elupus@ecce.se>
Co-authored-by: Shay Levy <levyshay1@gmail.com>
2022-11-22 11:35:18 +01:00
J. Nick Koston
d0efdd750f
Fix high latency from thundering heard at 0 microseconds ( #82233 )
...
* Fix high latency at 0 microseconds
fixes #82231
* fix async_track_utc_time_change alignment
* use replace to preserve fold
* naming
* tweak
* make async_fire_time_changed aware of the thundering heard issue
2022-11-17 14:22:06 -05:00
Aarni Koskela
4f7b583f19
Fix shadowing of outer name in config_validation ( #82088 )
...
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2022-11-16 14:04:57 +01:00
Aarni Koskela
8038485ca4
Use partition instead of split where possible in core ( #81806 )
2022-11-15 21:45:48 +01:00
Steve Repsher
c940ad9920
Add autocomplete to text selector ( #81060 )
2022-11-15 12:58:59 -06:00
uvjustin
e7dd31f37b
Iterate over entities safely in camera setup ( #82080 )
...
fixes undefined
2022-11-15 08:02:35 -06:00
Aarni Koskela
3d29638804
Deduplicate sensor_device_info_to_device_info
( #81905 )
...
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-11-14 12:12:53 -06:00
epenet
9f691ab359
Revert "Fix coordinator TypeVar definition ( #81298 )" ( #81834 )
2022-11-09 09:03:59 +01:00
Marc Mueller
0c8eeaa643
Update mypy to 0.990 ( #81783 )
...
* Update mypy to 0.990
* Remove type ignore - overriding attr with property (13475)
* Remove type ignores - hasattr (13544)
* Adjust type ignore - assignment (13549)
* New error code - type-abstract (13785)
* Disable annotation-unchecked (13851)
2022-11-08 14:41:39 +01:00
epenet
318122fe53
Fix coordinator TypeVar definition ( #81298 )
...
* Adjust coordinator TypeVar definition
* Adjust again
2022-11-08 10:38:29 +01:00
Erik Montnemery
c3d4a9cd99
Create repairs issue if an outdated currency code is configured ( #81717 )
...
* Create repairs issue if an outdated currency code is configured
* Add script for updating list of currencies
* Use black for formatting
* Move currency codes to a separate file
* Address review comments
2022-11-08 07:21:09 +01:00
epenet
5e05739019
Add type hints to template helper ( #81308 )
...
* Add type hints to template helper
* Update homeassistant/helpers/template.py
* Adjust use of ensure_compiled
2022-11-07 09:41:53 +01:00
Petro31
f73fc9e355
Adds states and state_attr as a filter, adds is_state and is_state_attr as a test. ( #79473 )
2022-10-25 19:49:51 +02:00
Franck Nijhof
326344db12
Rename entry_id template method to config_entry_id ( #80935 )
2022-10-25 12:11:14 +02:00
Erik Montnemery
6979cd95b0
Add suggested_unit_of_measurement attribute to sensors ( #80638 )
...
* 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>
2022-10-24 16:08:02 +02:00
epenet
eb93372cd6
Improve type hint in entity_component ( #80596 )
...
Imrpove type hint in entity_component
2022-10-20 12:38:22 +02:00
Marc Mueller
d78c2a31a1
Update pylint to 2.15.4 ( #80612 )
2022-10-20 08:59:06 +02:00
epenet
bff5d1123f
Deprecate CONF_UNIT_SYSTEM_*** constants ( #80320 )
...
* Deprecate CONF_UNIT_SYSTEM_*** constants
* Adjust pylint plugin
* Add tests
* Remove single-use function
* Revert logic change
* Revert "Revert logic change"
This reverts commit 60959a0050
.
* Tweak again
2022-10-14 16:50:04 +02:00
Janick Bergeron
f21a004aa9
Fix before sunrise OR after sunset condition ( #76143 )
...
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Ben Randall <veleek@gmail.com>
2022-10-14 13:11:10 +02:00
HarvsG
e5dafbc166
Make _TrackTemplateResultInfo not private ( #79812 )
2022-10-09 15:23:08 +02:00
Erik Montnemery
59d9d3de69
Add at_started helper ( #79577 )
2022-10-05 12:24:51 +02:00
Erik Montnemery
18033532ca
Fix search throwing on templated services ( #79637 )
2022-10-05 10:59:18 +03:00
ehendrix23
47b40e1e61
Add optional default value to average template function/filter ( #77499 )
...
* Return None on empty list
* Updated to use default value
* Update comment.
2022-10-03 10:07:19 +02:00