* area conversions
* start work on tests
* add number device class
* update unit conversions to utilise distance constants
* add area unit
* update test unit system
* update device condition and trigger
* update statistic unit converters
* further tests work WIP
* update test unit system
* add missing string translations
* fix websocket tests
* add deprecated notice
* add more missing strings and missing initialisation of unit system
* adjust icon and remove strings from scrape and random
* Fix acre to meters conversion
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Tidy up valid units
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* fix ordering of area
* update order alphabetically
* fix broken test
* update test_init
* Update homeassistant/const.py
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* remove deprecated unit and fix alphabetical order
* change deprecation and add tests, change to millimeter conversion for inches
* fix order
* re-order defs alphabetically
* add measurement as well
* update icons
* fix up Deprecation of area square meters
* Update core integrations to UnitOfArea
* update test recorder tests
* unit system tests in alphabetical
* update snapshot
* rebuild
* revert alphabetization of functions
* other revert of alphabetical order
---------
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Limit maximum template render output to 256KiB
fixes#124931
256KiB is likely to still block the event loop for an unreasonable amont of
time but its likely someone is using the template engine for large
blocks of data so we want a limit which still allows that but has
a reasonable safety to prevent the system from crashing down
* Update homeassistant/helpers/template.py
* Addition of add filter
This change adds an `add` filter, the addition equivalent of the existing `multiply` filter.
* Test for add filter
* Update test_template.py
* Update tests/helpers/test_template.py
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Fix lying docstring for relative_time template function
* Update homeassistant/helpers/template.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Remove unused state translations
There have been replaced with entity translations
https://github.com/home-assistant/developers.home-assistant/pull/1557https://github.com/home-assistant/core/pull/82701
* nothing does merging anymore
* useless dispatch
* remove
* remove platform code from hassfest
* preen
* Update homeassistant/helpers/translation.py
* ruff
* fix merge
* check is impossible now since we already know if translations exist or not
* keep the function for now
* remove unreachable code since we filter out `.` before now
* reduce
* reduce
* fix merge conflict (again)
* Add 'issues' template function for listing active issues.
* Add issue template function test
* Add 'issue' template function for getting specific issue by domain and issue_id
* Remove comment
* Fix function description
* Remove reduntant function,
Fix tests
* remove pass_context
* remove issues filter
Co-authored-by: Erik Montnemery <erik@montnemery.com>
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Allow specifying a custom log function for template render
* Bypass template cache when reporting errors + fix tests
* Send errors as events
* Fix logic for creating new TemplateEnvironment
* Add strict mode back
* Only send error events if report_errors is True
* Force test of websocket_api only
* Debug test
* Run pytest with higher verbosity
* Timeout after 1 minute, enable syslog output
* Adjust timeout
* Add debug logs
* Fix unsafe call to WebSocketHandler._send_message
* Remove debug code
* Improve test coverage
* Revert accidental change
* Include severity in error events
* Remove redundant information from error events