Commit graph

59266 commits

Author SHA1 Message Date
Maikel Punie
ffcc9100a6
Bump velbusaio to 2024.5.1 (#118091) 2024-05-25 10:24:06 +02:00
Paulus Schoutsen
81f3387d06
Flip prompts to put user prompt on top (#118085) 2024-05-25 00:33:24 -04:00
Paulus Schoutsen
69f237fa9e
Update Google safety defaults to match Google (#118084) 2024-05-25 00:02:53 -04:00
Paulus Schoutsen
676fe5a9a2
Add recommended model options to OpenAI (#118083)
* Add recommended options to OpenAI

* Use string join
2024-05-25 00:01:48 -04:00
Paulus Schoutsen
c59d4f9bba
Add no-API LLM prompt back to Google (#118082)
* Add no-API LLM prompt back

* Use string join
2024-05-25 00:00:04 -04:00
Paulus Schoutsen
86a24cc3b9
Fix default Google AI prompt on initial setup (#118078) 2024-05-24 23:55:11 -04:00
Paulus Schoutsen
a257f63119
Add device info to OpenAI (#118077) 2024-05-24 23:55:01 -04:00
J. Nick Koston
d71c7705ae
Convert remaining mqtt attrs classes to dataclasses (#118073) 2024-05-24 17:44:50 -10:00
J. Nick Koston
42232ecc8a
Remove unused code in template helper (#118075) 2024-05-24 17:44:24 -10:00
J. Nick Koston
6923fb1601
Avoid template context manager overhead when template is already compiled (#118079) 2024-05-24 17:44:02 -10:00
J. Nick Koston
5cb3bc19c0
Speed up async_render_with_possible_json_value (#118080) 2024-05-24 17:43:42 -10:00
J. Nick Koston
3416162fdb
Remove OrderedDict from entity_values as dict guarantees order on newer cpython (#118081) 2024-05-24 17:43:20 -10:00
J. Nick Koston
f026083712
Speed up is_template_string by avoiding regex engine (#118076) 2024-05-24 17:42:55 -10:00
Paulus Schoutsen
4b0f58ec63
Add device info to Google (#118074) 2024-05-24 22:23:25 -04:00
Denis Shulyaka
da74ac06d7
Add user name and location to the LLM assist prompt (#118071)
Add user name and location to the llm assist prompt
2024-05-24 22:23:05 -04:00
tronikos
620487fe75
Add Google Generative AI safety settings (#117679)
* Add safety settings

* snapshot-update

* DROPDOWN

* fix test

* rename const

* Update const.py

* Update strings.json
2024-05-24 21:48:39 -04:00
tronikos
5ca27f5d0c
Google Generative AI: add timeout to ensure we don't block HA startup (#118066)
* timeout

* fix

* tests
2024-05-24 21:31:02 -04:00
J. Nick Koston
90d10dd773
Use defaultdict instead of setdefault in mqtt client (#118070) 2024-05-24 14:34:06 -10:00
J. Nick Koston
3031e4733b
Reduce duplicate code to handle mqtt message replies (#118067) 2024-05-24 14:33:21 -10:00
J. Nick Koston
c7a1c59215
Avoid catch_log_exception overhead in MQTT for simple callbacks (#118036) 2024-05-24 14:32:32 -10:00
J. Nick Koston
65a702761b
Avoid generating matchers that will never be used in MQTT (#118068) 2024-05-24 14:04:03 -10:00
Jan Bouwhuis
fa1ef8b0cf
Split mqtt subscribe and unsubscribe calls to smaller chunks (#118035) 2024-05-24 13:33:28 -10:00
Jan Bouwhuis
01f3a5a97c
Consequently ignore empty MQTT state payloads and set state to unknown on "None" payload (#117813)
* Consequently ignore empty MQTT state payloads and set state to `unknown` on "None" payload

* Do not change preset mode behavior

* Add device tracker ignoring empty state

* Ignore empty state for lock

* Resolve merge errors
2024-05-25 01:29:43 +02:00
Jan Bouwhuis
c616fc036e
Move recorder chunk utils to shared collection utils (#118065) 2024-05-24 12:49:39 -10:00
Jan Bouwhuis
7522bbfa9d
Refactor mqtt callbacks for climate and water_heater (#118040)
* Refactor mqtt callbacks for climate and water_heater

* Reduce callbacks
2024-05-25 00:20:05 +02:00
J. Nick Koston
cf73a47fc0
Significantly speed up single use callback dispatchers (#117934) 2024-05-24 11:21:10 -10:00
Aaron Bach
881237189d
Add activity type to appropriate RainMachine switches (#117875) 2024-05-24 22:40:13 +02:00
Jan Bouwhuis
35a20d9c60
Refactor mqtt callbacks for cover (#118044) 2024-05-24 10:26:24 -10:00
Jan Bouwhuis
4b89443f62
Refactor mqtt callbacks for alarm_control_panel (#118037) 2024-05-24 10:20:37 -10:00
Paulus Schoutsen
7554ca9460
Allow llm API to render dynamic template prompt (#118055)
* Allow llm API to render dynamic template prompt

* Make rendering api prompt async so it can become a RAG

* Fix test
2024-05-24 16:04:48 -04:00
Paulus Schoutsen
3b2cdb63f1
Update OpenAI defaults (#118059)
* Update OpenAI defaults

* Update max temperature
2024-05-24 15:37:44 -04:00
Paulus Schoutsen
ffc3560dad
Remove unneeded asserts (#118056)
* Remove unneeded asserts

* No need to guard changing a timer that is owned by a disconnected device
2024-05-24 14:56:57 -04:00
Michael Hansen
5be15c94bc
Require registered device id for all timer intents (#117946)
* Require device id when registering timer handlers

* Require device id for timer intents

* Raise errors for unregistered device ids

* Add callback

* Add types for callback to __all__

* Clean up

* More clean up
2024-05-24 12:55:52 -05:00
J. Nick Koston
a8fba691ee
Add types to event tracker data (#118010)
* Add types to event tracker data

* fixes

* do not test event internals in other tests

* fixes

* Update homeassistant/helpers/event.py

* cleanup

* cleanup
2024-05-24 10:09:39 -04:00
dontinelli
7183260d95
Change ZoneInfo to async_get_time_zone in fyta (#117996) 2024-05-24 16:09:18 +02:00
Robert Resch
cb62f4242e
Remove strict connection (#117933) 2024-05-24 15:50:22 +02:00
Jan Bouwhuis
6f81852eb4
Rename MQTT mixin classes (#118039) 2024-05-24 15:41:59 +02:00
Brian Rogers
080bba5d9b
Update Rachio hose timer battery sensor (#118045) 2024-05-24 15:31:05 +02:00
Marc Mueller
dd22ee3dac
Improve annotation styling (#118032) 2024-05-24 15:05:53 +02:00
J. Nick Koston
2308ff2cbf
Add json cache to lovelace config (#117843) 2024-05-24 14:07:43 +02:00
Yuval Aboulafia
2c09f72c33
Add config flow to Jewish Calendar (#84464)
* Initial commit

* add basic tests (will probably fail)

* Set basic UID for now

* Various improvements

* use new naming convention?

* bit by bit, still not working tho

* Add tz selection

* Remove failing tests

* update unique_id

* add the tests again

* revert to previous binary_sensor test

* remove translations

* apply suggestions

* remove const.py

* Address review

* revert changes

* Initial fixes for tests

* Initial commit

* add basic tests (will probably fail)

* Set basic UID for now

* Various improvements

* use new naming convention?

* bit by bit, still not working tho

* Add tz selection

* Remove failing tests

* update unique_id

* add the tests again

* revert to previous binary_sensor test

* remove translations

* apply suggestions

* remove const.py

* Address review

* revert changes

* Fix bad merges in rebase

* Get tests to run again

* Fixes due to fails in ruff/pylint

* Fix binary sensor tests

* Fix config flow tests

* Fix sensor tests

* Apply review

* Adjust candle lights

* Apply suggestion

* revert unrelated change

* Address some of the comments

* We should only allow a single jewish calendar config entry

* Make data schema easier to read

* Add test and confirm only single entry is allowed

* Move OPTIONS_SCHEMA to top of file

* Add options test

* Simplify import tests

* Test import end2end

* Use a single async_forward_entry_setups statement

* Revert schema updates for YAML schema

* Remove unneeded brackets

* Remove CONF_NAME from config_flow

* Assign hass.data[DOMAIN][config_entry.entry_id] to a local variable before creating the sensors

* Data doesn't have a name remove slugifying of it

* Test that the entry has been created correctly

* Simplify setup_entry

* Use suggested values helper and flatten location dictionary

* Remove the string for name exists as this error doesn't exist

* Remove name from config entry

* Remove _attr_has_entity_name - will be added in a subsequent PR

* Don't override entity id's - we'll fixup the naming later

* Make location optional - will by default revert to the user's home location

* Update homeassistant/components/jewish_calendar/strings.json

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* No need for local lat/long variable

* Return name attribute, will deal with it in another PR

* Revert unique_id changes, will deal with this in a subsequent PR

* Add time zone data description

* Don't break the YAML config until the user has removed it.

* Cleanup initial config flow test

---------

Co-authored-by: Tsvi Mostovicz <ttmost@gmail.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-05-24 14:04:17 +02:00
Marcel van der Veldt
23597a8cdf
Extend the blocklist for Matter transitions with more models (#118038) 2024-05-24 13:50:10 +02:00
Fabrice
d4acd86819
Make co/co2 threshold configurable via entity_config (#112978)
* make co/co2 threshold configurable via entity_config

* Split threshold into co/co2_threshold configuration
2024-05-24 13:28:19 +02:00
Philip Rosenberg-Watt
e7d23d8b49
Add APRS object tracking (#113080)
* Add APRS object tracking

Closes issue #111731

* Fix unit test

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-05-24 13:13:02 +02:00
Jan Bouwhuis
f12aee28a8
Improve error logging on invalid MQTT entity state (#118006)
* Improve error logging on invalid MQTT entity state

* Explain not hanlding TpeError and ValueError

* Move length check closer to source

* use _LOGGER.exception
2024-05-24 13:11:52 +02:00
Brett Adams
b99476284b
Add Cover platform to Teslemetry (#117340)
* Add cover

* Test coverage

* Json lint

* Apply suggestions from code review

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Update tests

* Fix features

* Update snapshot from fixture

* Apply suggestions from code review

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-05-24 12:09:23 +02:00
Jan Bouwhuis
9333965b23
Create bound callback_message_received method for handling mqtt callbacks (#117951)
* Create bound callback_message_received method for handling mqtt callbacks

* refactor a bit

* fix ruff

* reduce overhead

* cleanup

* cleanup

* Revert changes alarm_control_panel

* Add sensor and binary sensor

* use same pattern for MqttAttributes/MqttAvailability

* remove useless function since we did not need to add to it

* code cleanup

* collapse

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-24 11:18:25 +02:00
epenet
d4df86da06
Move TibberDataCoordinator to separate module (#118027) 2024-05-24 11:05:54 +02:00
epenet
95840a031a
Move nuki coordinator to separate module (#117975) 2024-05-24 10:55:26 +02:00
Thomas55555
13385912d1
Refactor Husqvarna Automower (#117938) 2024-05-24 10:54:19 +02:00