homeassistant-stubs 2024.8.2__py3-none-any.whl → 2024.9.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. homeassistant-stubs/components/acer_projector/switch.pyi +1 -1
  2. homeassistant-stubs/components/airgradient/update.pyi +23 -0
  3. homeassistant-stubs/components/airvisual/__init__.pyi +0 -1
  4. homeassistant-stubs/components/airvisual_pro/config_flow.pyi +1 -1
  5. homeassistant-stubs/components/airzone/select.pyi +9 -1
  6. homeassistant-stubs/components/airzone_cloud/binary_sensor.pyi +2 -0
  7. homeassistant-stubs/components/airzone_cloud/sensor.pyi +2 -0
  8. homeassistant-stubs/components/amazon_polly/const.pyi +5 -8
  9. homeassistant-stubs/components/amazon_polly/tts.pyi +2 -1
  10. homeassistant-stubs/components/ambient_station/__init__.pyi +1 -2
  11. homeassistant-stubs/components/ambient_station/config_flow.pyi +2 -1
  12. homeassistant-stubs/components/android_ip_webcam/__init__.pyi +0 -2
  13. homeassistant-stubs/components/apcupsd/__init__.pyi +0 -1
  14. homeassistant-stubs/components/apcupsd/const.pyi +1 -1
  15. homeassistant-stubs/components/apcupsd/sensor.pyi +2 -2
  16. homeassistant-stubs/components/apsystems/binary_sensor.pyi +28 -0
  17. homeassistant-stubs/components/apsystems/coordinator.pyi +12 -4
  18. homeassistant-stubs/components/apsystems/number.pyi +1 -1
  19. homeassistant-stubs/components/arcam_fmj/__init__.pyi +1 -2
  20. homeassistant-stubs/components/aseko_pool_live/config_flow.pyi +2 -2
  21. homeassistant-stubs/components/assist_pipeline/audio_enhancer.pyi +4 -1
  22. homeassistant-stubs/components/assist_pipeline/pipeline.pyi +1 -1
  23. homeassistant-stubs/components/assist_pipeline/vad.pyi +5 -4
  24. homeassistant-stubs/components/bang_olufsen/const.pyi +11 -11
  25. homeassistant-stubs/components/bang_olufsen/media_player.pyi +1 -0
  26. homeassistant-stubs/components/bang_olufsen/util.pyi +1 -1
  27. homeassistant-stubs/components/bang_olufsen/websocket.pyi +1 -0
  28. homeassistant-stubs/components/bmw_connected_drive/__init__.pyi +0 -1
  29. homeassistant-stubs/components/bmw_connected_drive/coordinator.pyi +1 -0
  30. homeassistant-stubs/components/bthome/sensor.pyi +1 -1
  31. homeassistant-stubs/components/canary/config_flow.pyi +1 -1
  32. homeassistant-stubs/components/cert_expiry/config_flow.pyi +1 -1
  33. homeassistant-stubs/components/command_line/notify.pyi +1 -1
  34. homeassistant-stubs/components/deconz/select.pyi +12 -0
  35. homeassistant-stubs/components/demo/alarm_control_panel.pyi +0 -3
  36. homeassistant-stubs/components/demo/config_flow.pyi +1 -1
  37. homeassistant-stubs/components/devolo_home_network/config_flow.pyi +1 -1
  38. homeassistant-stubs/components/dhcp/__init__.pyi +0 -1
  39. homeassistant-stubs/components/downloader/config_flow.pyi +1 -1
  40. homeassistant-stubs/components/ecovacs/__init__.pyi +2 -6
  41. homeassistant-stubs/components/ecovacs/config_flow.pyi +1 -5
  42. homeassistant-stubs/components/elkm1/config_flow.pyi +1 -1
  43. homeassistant-stubs/components/enigma2/config_flow.pyi +1 -1
  44. homeassistant-stubs/components/esphome/climate.pyi +1 -1
  45. homeassistant-stubs/components/esphome/entity.pyi +4 -4
  46. homeassistant-stubs/components/esphome/entry_data.pyi +2 -1
  47. homeassistant-stubs/components/esphome/manager.pyi +1 -0
  48. homeassistant-stubs/components/esphome/media_player.pyi +1 -1
  49. homeassistant-stubs/components/esphome/number.pyi +1 -1
  50. homeassistant-stubs/components/esphome/sensor.pyi +1 -1
  51. homeassistant-stubs/components/feedreader/config_flow.pyi +1 -1
  52. homeassistant-stubs/components/filesize/coordinator.pyi +1 -0
  53. homeassistant-stubs/components/fitbit/config_flow.pyi +1 -1
  54. homeassistant-stubs/components/fritzbox/light.pyi +4 -7
  55. homeassistant-stubs/components/fronius/sensor.pyi +1 -1
  56. homeassistant-stubs/components/fujitsu_fglair/__init__.pyi +12 -0
  57. homeassistant-stubs/components/fujitsu_fglair/climate.pyi +53 -0
  58. homeassistant-stubs/components/fujitsu_fglair/config_flow.pyi +18 -0
  59. homeassistant-stubs/components/fujitsu_fglair/const.pyi +7 -0
  60. homeassistant-stubs/components/fujitsu_fglair/coordinator.pyi +15 -0
  61. homeassistant-stubs/components/fyta/__init__.pyi +15 -0
  62. homeassistant-stubs/components/fyta/config_flow.pyi +22 -0
  63. homeassistant-stubs/components/fyta/const.pyi +2 -0
  64. homeassistant-stubs/components/fyta/coordinator.pyi +18 -0
  65. homeassistant-stubs/components/fyta/diagnostics.pyi +10 -0
  66. homeassistant-stubs/components/fyta/entity.pyi +20 -0
  67. homeassistant-stubs/components/fyta/sensor.pyi +29 -0
  68. homeassistant-stubs/components/glances/__init__.pyi +0 -1
  69. homeassistant-stubs/components/google/config_flow.pyi +0 -2
  70. homeassistant-stubs/components/gpsd/config_flow.pyi +0 -1
  71. homeassistant-stubs/components/gpsd/sensor.pyi +6 -9
  72. homeassistant-stubs/components/homeassistant_yellow/__init__.pyi +7 -2
  73. homeassistant-stubs/components/homeassistant_yellow/config_flow.pyi +31 -9
  74. homeassistant-stubs/components/homeassistant_yellow/const.pyi +2 -0
  75. homeassistant-stubs/components/homekit/config_flow.pyi +1 -1
  76. homeassistant-stubs/components/homewizard/sensor.pyi +1 -1
  77. homeassistant-stubs/components/husqvarna_automower/button.pyi +0 -1
  78. homeassistant-stubs/components/hydrawise/config_flow.pyi +1 -1
  79. homeassistant-stubs/components/intent_script/__init__.pyi +1 -0
  80. homeassistant-stubs/components/islamic_prayer_times/__init__.pyi +0 -2
  81. homeassistant-stubs/components/isy994/const.pyi +1 -1
  82. homeassistant-stubs/components/jewish_calendar/config_flow.pyi +1 -2
  83. homeassistant-stubs/components/jvc_projector/__init__.pyi +3 -3
  84. homeassistant-stubs/components/jvc_projector/binary_sensor.pyi +2 -4
  85. homeassistant-stubs/components/jvc_projector/config_flow.pyi +1 -1
  86. homeassistant-stubs/components/jvc_projector/remote.pyi +2 -3
  87. homeassistant-stubs/components/jvc_projector/select.pyi +2 -4
  88. homeassistant-stubs/components/jvc_projector/sensor.pyi +2 -4
  89. homeassistant-stubs/components/knx/climate.pyi +4 -5
  90. homeassistant-stubs/components/knx/const.pyi +1 -2
  91. homeassistant-stubs/components/knx/project.pyi +2 -1
  92. homeassistant-stubs/components/knx/websocket.pyi +20 -12
  93. homeassistant-stubs/components/lawn_mower/const.pyi +1 -0
  94. homeassistant-stubs/components/lcn/__init__.pyi +2 -1
  95. homeassistant-stubs/components/lcn/binary_sensor.pyi +3 -2
  96. homeassistant-stubs/components/lcn/climate.pyi +3 -2
  97. homeassistant-stubs/components/lcn/config_flow.pyi +16 -7
  98. homeassistant-stubs/components/lcn/const.pyi +1 -0
  99. homeassistant-stubs/components/lcn/cover.pyi +3 -2
  100. homeassistant-stubs/components/lcn/helpers.pyi +1 -0
  101. homeassistant-stubs/components/lcn/light.pyi +3 -2
  102. homeassistant-stubs/components/lcn/scene.pyi +3 -2
  103. homeassistant-stubs/components/lcn/schemas.pyi +1 -0
  104. homeassistant-stubs/components/lcn/sensor.pyi +3 -2
  105. homeassistant-stubs/components/lcn/switch.pyi +3 -2
  106. homeassistant-stubs/components/lcn/websocket.pyi +25 -0
  107. homeassistant-stubs/components/lidarr/config_flow.pyi +1 -1
  108. homeassistant-stubs/components/linkplay/__init__.pyi +5 -1
  109. homeassistant-stubs/components/linkplay/config_flow.pyi +5 -1
  110. homeassistant-stubs/components/linkplay/const.pyi +1 -0
  111. homeassistant-stubs/components/linkplay/utils.pyi +5 -0
  112. homeassistant-stubs/components/local_ip/__init__.pyi +1 -4
  113. homeassistant-stubs/components/logbook/models.pyi +27 -17
  114. homeassistant-stubs/components/logbook/processor.pyi +7 -9
  115. homeassistant-stubs/components/logbook/rest_api.pyi +1 -1
  116. homeassistant-stubs/components/logbook/websocket_api.pyi +3 -3
  117. homeassistant-stubs/components/luftdaten/__init__.pyi +0 -1
  118. homeassistant-stubs/components/madvr/config_flow.pyi +9 -3
  119. homeassistant-stubs/components/manual/alarm_control_panel.pyi +77 -0
  120. homeassistant-stubs/components/mastodon/__init__.pyi +19 -3
  121. homeassistant-stubs/components/mastodon/config_flow.pyi +3 -2
  122. homeassistant-stubs/components/mastodon/const.pyi +3 -0
  123. homeassistant-stubs/components/mastodon/coordinator.pyi +11 -0
  124. homeassistant-stubs/components/mastodon/diagnostics.pyi +6 -0
  125. homeassistant-stubs/components/mastodon/entity.pyi +15 -0
  126. homeassistant-stubs/components/mastodon/sensor.pyi +25 -0
  127. homeassistant-stubs/components/media_extractor/config_flow.pyi +1 -1
  128. homeassistant-stubs/components/mikrotik/__init__.pyi +0 -1
  129. homeassistant-stubs/components/mikrotik/config_flow.pyi +1 -1
  130. homeassistant-stubs/components/mqtt/__init__.pyi +2 -1
  131. homeassistant-stubs/components/mqtt/addon.pyi +10 -0
  132. homeassistant-stubs/components/mqtt/client.pyi +1 -0
  133. homeassistant-stubs/components/mqtt/climate.pyi +2 -1
  134. homeassistant-stubs/components/mqtt/config_flow.pyi +20 -1
  135. homeassistant-stubs/components/mqtt/const.pyi +2 -0
  136. homeassistant-stubs/components/mqtt/device_tracker.pyi +2 -1
  137. homeassistant-stubs/components/mqtt/event.pyi +2 -1
  138. homeassistant-stubs/components/mqtt/fan.pyi +2 -1
  139. homeassistant-stubs/components/mqtt/humidifier.pyi +2 -1
  140. homeassistant-stubs/components/mqtt/lawn_mower.pyi +2 -1
  141. homeassistant-stubs/components/mqtt/light/schema_basic.pyi +2 -1
  142. homeassistant-stubs/components/mqtt/light/schema_template.pyi +2 -1
  143. homeassistant-stubs/components/mqtt/lock.pyi +2 -1
  144. homeassistant-stubs/components/mqtt/mixins.pyi +1 -1
  145. homeassistant-stubs/components/mqtt/models.pyi +5 -3
  146. homeassistant-stubs/components/mqtt/number.pyi +2 -1
  147. homeassistant-stubs/components/mqtt/schemas.pyi +1 -1
  148. homeassistant-stubs/components/mqtt/select.pyi +3 -3
  149. homeassistant-stubs/components/mqtt/sensor.pyi +5 -3
  150. homeassistant-stubs/components/mqtt/siren.pyi +2 -1
  151. homeassistant-stubs/components/mqtt/tag.pyi +2 -1
  152. homeassistant-stubs/components/mqtt/text.pyi +2 -1
  153. homeassistant-stubs/components/mqtt/trigger.pyi +2 -1
  154. homeassistant-stubs/components/mqtt/vacuum.pyi +3 -5
  155. homeassistant-stubs/components/mysensors/__init__.pyi +0 -1
  156. homeassistant-stubs/components/mysensors/gateway.pyi +2 -1
  157. homeassistant-stubs/components/mysensors/sensor.pyi +1 -1
  158. homeassistant-stubs/components/nest/__init__.pyi +5 -2
  159. homeassistant-stubs/components/nest/event.pyi +36 -0
  160. homeassistant-stubs/components/notion/__init__.pyi +0 -1
  161. homeassistant-stubs/components/number/const.pyi +1 -1
  162. homeassistant-stubs/components/otbr/__init__.pyi +6 -5
  163. homeassistant-stubs/components/otbr/config_flow.pyi +7 -1
  164. homeassistant-stubs/components/otbr/silabs_multiprotocol.pyi +8 -4
  165. homeassistant-stubs/components/otbr/util.pyi +7 -2
  166. homeassistant-stubs/components/otbr/websocket_api.pyi +1 -0
  167. homeassistant-stubs/components/overkiz/water_heater_entities/atlantic_domestic_hot_water_production_mlb_component.pyi +1 -1
  168. homeassistant-stubs/components/pi_hole/__init__.pyi +0 -1
  169. homeassistant-stubs/components/powerwall/__init__.pyi +0 -1
  170. homeassistant-stubs/components/prometheus/__init__.pyi +2 -1
  171. homeassistant-stubs/components/proximity/__init__.pyi +3 -25
  172. homeassistant-stubs/components/proximity/config_flow.pyi +0 -1
  173. homeassistant-stubs/components/proximity/coordinator.pyi +1 -3
  174. homeassistant-stubs/components/radarr/config_flow.pyi +1 -1
  175. homeassistant-stubs/components/rainmachine/__init__.pyi +0 -1
  176. homeassistant-stubs/components/recorder/core.pyi +0 -1
  177. homeassistant-stubs/components/recorder/migration.pyi +9 -4
  178. homeassistant-stubs/components/recorder/statistics.pyi +3 -3
  179. homeassistant-stubs/components/recorder/table_managers/statistics_meta.pyi +8 -2
  180. homeassistant-stubs/components/recorder/websocket_api.pyi +1 -1
  181. homeassistant-stubs/components/ring/__init__.pyi +1 -0
  182. homeassistant-stubs/components/ring/button.pyi +1 -1
  183. homeassistant-stubs/components/ring/camera.pyi +4 -4
  184. homeassistant-stubs/components/ring/config_flow.pyi +1 -0
  185. homeassistant-stubs/components/ring/coordinator.pyi +3 -2
  186. homeassistant-stubs/components/ring/entity.pyi +3 -3
  187. homeassistant-stubs/components/ring/light.pyi +3 -3
  188. homeassistant-stubs/components/ring/siren.pyi +1 -1
  189. homeassistant-stubs/components/ring/switch.pyi +3 -3
  190. homeassistant-stubs/components/roku/__init__.pyi +0 -1
  191. homeassistant-stubs/components/samsungtv/__init__.pyi +0 -1
  192. homeassistant-stubs/components/sensor/const.pyi +1 -1
  193. homeassistant-stubs/components/sensor/recorder.pyi +1 -0
  194. homeassistant-stubs/components/shelly/const.pyi +1 -0
  195. homeassistant-stubs/components/shelly/coordinator.pyi +11 -3
  196. homeassistant-stubs/components/shelly/diagnostics.pyi +1 -0
  197. homeassistant-stubs/components/shelly/entity.pyi +2 -0
  198. homeassistant-stubs/components/shelly/utils.pyi +4 -2
  199. homeassistant-stubs/components/simplisafe/__init__.pyi +0 -1
  200. homeassistant-stubs/components/simplisafe/config_flow.pyi +1 -1
  201. homeassistant-stubs/components/sleepiq/config_flow.pyi +1 -1
  202. homeassistant-stubs/components/sun/config_flow.pyi +1 -1
  203. homeassistant-stubs/components/synology_dsm/__init__.pyi +0 -1
  204. homeassistant-stubs/components/synology_dsm/media_source.pyi +1 -0
  205. homeassistant-stubs/components/systemmonitor/sensor.pyi +2 -4
  206. homeassistant-stubs/components/tailwind/config_flow.pyi +1 -1
  207. homeassistant-stubs/components/tcp/common.pyi +0 -1
  208. homeassistant-stubs/components/technove/binary_sensor.pyi +5 -1
  209. homeassistant-stubs/components/technove/switch.pyi +11 -4
  210. homeassistant-stubs/components/thethingsnetwork/config_flow.pyi +1 -1
  211. homeassistant-stubs/components/tile/config_flow.pyi +1 -1
  212. homeassistant-stubs/components/tradfri/__init__.pyi +0 -1
  213. homeassistant-stubs/components/trafikverket_train/__init__.pyi +1 -4
  214. homeassistant-stubs/components/trafikverket_train/coordinator.pyi +5 -4
  215. homeassistant-stubs/components/unifi/sensor.pyi +6 -1
  216. homeassistant-stubs/components/unifiprotect/migrate.pyi +1 -1
  217. homeassistant-stubs/components/water_heater/__init__.pyi +5 -6
  218. homeassistant-stubs/components/websocket_api/commands.pyi +3 -2
  219. homeassistant-stubs/components/websocket_api/http.pyi +6 -1
  220. homeassistant-stubs/components/yale_smart_alarm/__init__.pyi +0 -1
  221. homeassistant-stubs/components/yale_smart_alarm/coordinator.pyi +3 -1
  222. homeassistant-stubs/components/yale_smart_alarm/lock.pyi +1 -1
  223. homeassistant-stubs/components/zwave_js/config_flow.pyi +2 -3
  224. homeassistant-stubs/components/zwave_js/services.pyi +1 -0
  225. homeassistant-stubs/config_entries.pyi +2 -0
  226. homeassistant-stubs/const.pyi +7 -2
  227. homeassistant-stubs/core.pyi +1 -1
  228. homeassistant-stubs/generated/amazon_polly.pyi +5 -0
  229. homeassistant-stubs/helpers/aiohttp_client.pyi +4 -0
  230. homeassistant-stubs/helpers/collection.pyi +4 -1
  231. homeassistant-stubs/helpers/config_validation.pyi +23 -3
  232. homeassistant-stubs/helpers/entity_component.pyi +1 -1
  233. homeassistant-stubs/helpers/entity_platform.pyi +2 -2
  234. homeassistant-stubs/helpers/icon.pyi +2 -0
  235. homeassistant-stubs/helpers/service.pyi +4 -2
  236. homeassistant-stubs/helpers/trigger_template_entity.pyi +0 -1
  237. homeassistant-stubs/scripts/auth.pyi +9 -6
  238. homeassistant-stubs/scripts/benchmark/__init__.pyi +1 -2
  239. homeassistant-stubs/scripts/macos/__init__.pyi +1 -1
  240. homeassistant-stubs/util/async_.pyi +2 -1
  241. homeassistant-stubs/util/executor.pyi +1 -1
  242. homeassistant-stubs/util/unit_conversion.pyi +0 -17
  243. homeassistant-stubs/util/yaml/loader.pyi +1 -0
  244. {homeassistant_stubs-2024.8.2.dist-info → homeassistant_stubs-2024.9.0.dist-info}/METADATA +2 -2
  245. {homeassistant_stubs-2024.8.2.dist-info → homeassistant_stubs-2024.9.0.dist-info}/RECORD +248 -232
  246. homeassistant-stubs/components/asterisk_cdr/mailbox.pyi +0 -18
  247. homeassistant-stubs/components/asterisk_mbox/__init__.pyi +0 -31
  248. homeassistant-stubs/components/asterisk_mbox/mailbox.pyi +0 -26
  249. homeassistant-stubs/components/demo/mailbox.pyi +0 -24
  250. homeassistant-stubs/components/mailbox/__init__.pyi +0 -77
  251. homeassistant-stubs/components/proximity/helpers.pyi +0 -5
  252. homeassistant-stubs/components/systemmonitor/repairs.pyi +0 -15
  253. /homeassistant-stubs/components/{asterisk_cdr → manual}/__init__.pyi +0 -0
  254. {homeassistant_stubs-2024.8.2.dist-info → homeassistant_stubs-2024.9.0.dist-info}/LICENSE +0 -0
  255. {homeassistant_stubs-2024.8.2.dist-info → homeassistant_stubs-2024.9.0.dist-info}/WHEEL +0 -0
@@ -2,7 +2,7 @@ from . import subscription as subscription
2
2
  from .config import MQTT_RW_SCHEMA as MQTT_RW_SCHEMA
3
3
  from .const import CONF_ACTION_TEMPLATE as CONF_ACTION_TEMPLATE, CONF_ACTION_TOPIC as CONF_ACTION_TOPIC, CONF_COMMAND_TEMPLATE as CONF_COMMAND_TEMPLATE, CONF_COMMAND_TOPIC as CONF_COMMAND_TOPIC, CONF_CURRENT_HUMIDITY_TEMPLATE as CONF_CURRENT_HUMIDITY_TEMPLATE, CONF_CURRENT_HUMIDITY_TOPIC as CONF_CURRENT_HUMIDITY_TOPIC, CONF_STATE_TOPIC as CONF_STATE_TOPIC, CONF_STATE_VALUE_TEMPLATE as CONF_STATE_VALUE_TEMPLATE, PAYLOAD_NONE as PAYLOAD_NONE
4
4
  from .mixins import MqttEntity as MqttEntity, async_setup_entity_entry_helper as async_setup_entity_entry_helper
5
- from .models import MqttCommandTemplate as MqttCommandTemplate, MqttValueTemplate as MqttValueTemplate, PublishPayloadType as PublishPayloadType, ReceiveMessage as ReceiveMessage, ReceivePayloadType as ReceivePayloadType
5
+ from .models import MqttCommandTemplate as MqttCommandTemplate, MqttValueTemplate as MqttValueTemplate, PublishPayloadType as PublishPayloadType, ReceiveMessage as ReceiveMessage
6
6
  from .schemas import MQTT_ENTITY_COMMON_SCHEMA as MQTT_ENTITY_COMMON_SCHEMA
7
7
  from .util import valid_publish_topic as valid_publish_topic, valid_subscribe_topic as valid_subscribe_topic
8
8
  from _typeshed import Incomplete
@@ -13,6 +13,7 @@ from homeassistant.config_entries import ConfigEntry as ConfigEntry
13
13
  from homeassistant.const import CONF_NAME as CONF_NAME, CONF_OPTIMISTIC as CONF_OPTIMISTIC, CONF_PAYLOAD_OFF as CONF_PAYLOAD_OFF, CONF_PAYLOAD_ON as CONF_PAYLOAD_ON, CONF_STATE as CONF_STATE
14
14
  from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
15
15
  from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
16
+ from homeassistant.helpers.service_info.mqtt import ReceivePayloadType as ReceivePayloadType
16
17
  from homeassistant.helpers.template import Template as Template
17
18
  from homeassistant.helpers.typing import ConfigType as ConfigType, VolSchemaType as VolSchemaType
18
19
  from typing import Any
@@ -2,7 +2,7 @@ from . import subscription as subscription
2
2
  from .config import MQTT_BASE_SCHEMA as MQTT_BASE_SCHEMA
3
3
  from .const import CONF_RETAIN as CONF_RETAIN, DEFAULT_OPTIMISTIC as DEFAULT_OPTIMISTIC, DEFAULT_RETAIN as DEFAULT_RETAIN
4
4
  from .mixins import MqttEntity as MqttEntity, async_setup_entity_entry_helper as async_setup_entity_entry_helper
5
- from .models import MqttCommandTemplate as MqttCommandTemplate, MqttValueTemplate as MqttValueTemplate, PublishPayloadType as PublishPayloadType, ReceiveMessage as ReceiveMessage, ReceivePayloadType as ReceivePayloadType
5
+ from .models import MqttCommandTemplate as MqttCommandTemplate, MqttValueTemplate as MqttValueTemplate, PublishPayloadType as PublishPayloadType, ReceiveMessage as ReceiveMessage
6
6
  from .schemas import MQTT_ENTITY_COMMON_SCHEMA as MQTT_ENTITY_COMMON_SCHEMA
7
7
  from .util import valid_publish_topic as valid_publish_topic, valid_subscribe_topic as valid_subscribe_topic
8
8
  from _typeshed import Incomplete
@@ -14,6 +14,7 @@ from homeassistant.const import CONF_NAME as CONF_NAME, CONF_OPTIMISTIC as CONF_
14
14
  from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
15
15
  from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
16
16
  from homeassistant.helpers.restore_state import RestoreEntity as RestoreEntity
17
+ from homeassistant.helpers.service_info.mqtt import ReceivePayloadType as ReceivePayloadType
17
18
  from homeassistant.helpers.typing import ConfigType as ConfigType, VolSchemaType as VolSchemaType
18
19
 
19
20
  _LOGGER: Incomplete
@@ -2,7 +2,7 @@ from .. import subscription as subscription
2
2
  from ..config import MQTT_RW_SCHEMA as MQTT_RW_SCHEMA
3
3
  from ..const import CONF_COMMAND_TOPIC as CONF_COMMAND_TOPIC, CONF_STATE_TOPIC as CONF_STATE_TOPIC, CONF_STATE_VALUE_TEMPLATE as CONF_STATE_VALUE_TEMPLATE, PAYLOAD_NONE as PAYLOAD_NONE
4
4
  from ..mixins import MqttEntity as MqttEntity
5
- from ..models import MqttCommandTemplate as MqttCommandTemplate, MqttValueTemplate as MqttValueTemplate, PayloadSentinel as PayloadSentinel, PublishPayloadType as PublishPayloadType, ReceiveMessage as ReceiveMessage, ReceivePayloadType as ReceivePayloadType, TemplateVarsType as TemplateVarsType
5
+ from ..models import MqttCommandTemplate as MqttCommandTemplate, MqttValueTemplate as MqttValueTemplate, PayloadSentinel as PayloadSentinel, PublishPayloadType as PublishPayloadType, ReceiveMessage as ReceiveMessage, TemplateVarsType as TemplateVarsType
6
6
  from ..schemas import MQTT_ENTITY_COMMON_SCHEMA as MQTT_ENTITY_COMMON_SCHEMA
7
7
  from ..util import valid_publish_topic as valid_publish_topic, valid_subscribe_topic as valid_subscribe_topic
8
8
  from .schema import MQTT_LIGHT_SCHEMA_SCHEMA as MQTT_LIGHT_SCHEMA_SCHEMA
@@ -12,6 +12,7 @@ from homeassistant.components.light import ATTR_BRIGHTNESS as ATTR_BRIGHTNESS, A
12
12
  from homeassistant.const import CONF_NAME as CONF_NAME, CONF_OPTIMISTIC as CONF_OPTIMISTIC, CONF_PAYLOAD_OFF as CONF_PAYLOAD_OFF, CONF_PAYLOAD_ON as CONF_PAYLOAD_ON, STATE_ON as STATE_ON
13
13
  from homeassistant.core import callback as callback
14
14
  from homeassistant.helpers.restore_state import RestoreEntity as RestoreEntity
15
+ from homeassistant.helpers.service_info.mqtt import ReceivePayloadType as ReceivePayloadType
15
16
  from homeassistant.helpers.typing import ConfigType as ConfigType, VolSchemaType as VolSchemaType
16
17
  from typing import Any
17
18
 
@@ -2,7 +2,7 @@ from .. import subscription as subscription
2
2
  from ..config import MQTT_RW_SCHEMA as MQTT_RW_SCHEMA
3
3
  from ..const import CONF_COMMAND_TOPIC as CONF_COMMAND_TOPIC, CONF_STATE_TOPIC as CONF_STATE_TOPIC, PAYLOAD_NONE as PAYLOAD_NONE
4
4
  from ..mixins import MqttEntity as MqttEntity
5
- from ..models import MqttCommandTemplate as MqttCommandTemplate, MqttValueTemplate as MqttValueTemplate, PublishPayloadType as PublishPayloadType, ReceiveMessage as ReceiveMessage, ReceivePayloadType as ReceivePayloadType
5
+ from ..models import MqttCommandTemplate as MqttCommandTemplate, MqttValueTemplate as MqttValueTemplate, PublishPayloadType as PublishPayloadType, ReceiveMessage as ReceiveMessage
6
6
  from ..schemas import MQTT_ENTITY_COMMON_SCHEMA as MQTT_ENTITY_COMMON_SCHEMA
7
7
  from .schema import MQTT_LIGHT_SCHEMA_SCHEMA as MQTT_LIGHT_SCHEMA_SCHEMA
8
8
  from .schema_basic import MQTT_LIGHT_ATTRIBUTES_BLOCKED as MQTT_LIGHT_ATTRIBUTES_BLOCKED
@@ -12,6 +12,7 @@ from homeassistant.components.light import ATTR_BRIGHTNESS as ATTR_BRIGHTNESS, A
12
12
  from homeassistant.const import CONF_NAME as CONF_NAME, CONF_OPTIMISTIC as CONF_OPTIMISTIC, CONF_STATE_TEMPLATE as CONF_STATE_TEMPLATE, STATE_OFF as STATE_OFF, STATE_ON as STATE_ON
13
13
  from homeassistant.core import callback as callback
14
14
  from homeassistant.helpers.restore_state import RestoreEntity as RestoreEntity
15
+ from homeassistant.helpers.service_info.mqtt import ReceivePayloadType as ReceivePayloadType
15
16
  from homeassistant.helpers.typing import ConfigType as ConfigType, TemplateVarsType as TemplateVarsType, VolSchemaType as VolSchemaType
16
17
  from typing import Any
17
18
 
@@ -4,7 +4,7 @@ from . import subscription as subscription
4
4
  from .config import MQTT_RW_SCHEMA as MQTT_RW_SCHEMA
5
5
  from .const import CONF_COMMAND_TEMPLATE as CONF_COMMAND_TEMPLATE, CONF_COMMAND_TOPIC as CONF_COMMAND_TOPIC, CONF_PAYLOAD_RESET as CONF_PAYLOAD_RESET, CONF_STATE_OPEN as CONF_STATE_OPEN, CONF_STATE_OPENING as CONF_STATE_OPENING, CONF_STATE_TOPIC as CONF_STATE_TOPIC
6
6
  from .mixins import MqttEntity as MqttEntity, async_setup_entity_entry_helper as async_setup_entity_entry_helper
7
- from .models import MqttCommandTemplate as MqttCommandTemplate, MqttValueTemplate as MqttValueTemplate, PublishPayloadType as PublishPayloadType, ReceiveMessage as ReceiveMessage, ReceivePayloadType as ReceivePayloadType
7
+ from .models import MqttCommandTemplate as MqttCommandTemplate, MqttValueTemplate as MqttValueTemplate, PublishPayloadType as PublishPayloadType, ReceiveMessage as ReceiveMessage
8
8
  from .schemas import MQTT_ENTITY_COMMON_SCHEMA as MQTT_ENTITY_COMMON_SCHEMA
9
9
  from _typeshed import Incomplete
10
10
  from collections.abc import Callable as Callable
@@ -14,6 +14,7 @@ from homeassistant.config_entries import ConfigEntry as ConfigEntry
14
14
  from homeassistant.const import ATTR_CODE as ATTR_CODE, CONF_NAME as CONF_NAME, CONF_OPTIMISTIC as CONF_OPTIMISTIC, CONF_VALUE_TEMPLATE as CONF_VALUE_TEMPLATE
15
15
  from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
16
16
  from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
17
+ from homeassistant.helpers.service_info.mqtt import ReceivePayloadType as ReceivePayloadType
17
18
  from homeassistant.helpers.typing import ConfigType as ConfigType, TemplateVarsType as TemplateVarsType
18
19
  from typing import Any
19
20
 
@@ -12,7 +12,7 @@ from _typeshed import Incomplete
12
12
  from abc import ABC, abstractmethod
13
13
  from collections.abc import Callable as Callable, Coroutine
14
14
  from homeassistant.config_entries import ConfigEntry as ConfigEntry
15
- from homeassistant.const import ATTR_CONFIGURATION_URL as ATTR_CONFIGURATION_URL, ATTR_HW_VERSION as ATTR_HW_VERSION, ATTR_MANUFACTURER as ATTR_MANUFACTURER, ATTR_MODEL as ATTR_MODEL, ATTR_NAME as ATTR_NAME, ATTR_SERIAL_NUMBER as ATTR_SERIAL_NUMBER, ATTR_SUGGESTED_AREA as ATTR_SUGGESTED_AREA, ATTR_SW_VERSION as ATTR_SW_VERSION, ATTR_VIA_DEVICE as ATTR_VIA_DEVICE, CONF_DEVICE as CONF_DEVICE, CONF_ENTITY_CATEGORY as CONF_ENTITY_CATEGORY, CONF_ICON as CONF_ICON, CONF_MODEL as CONF_MODEL, CONF_NAME as CONF_NAME, CONF_UNIQUE_ID as CONF_UNIQUE_ID, CONF_VALUE_TEMPLATE as CONF_VALUE_TEMPLATE
15
+ from homeassistant.const import ATTR_CONFIGURATION_URL as ATTR_CONFIGURATION_URL, ATTR_HW_VERSION as ATTR_HW_VERSION, ATTR_MANUFACTURER as ATTR_MANUFACTURER, ATTR_MODEL as ATTR_MODEL, ATTR_MODEL_ID as ATTR_MODEL_ID, ATTR_NAME as ATTR_NAME, ATTR_SERIAL_NUMBER as ATTR_SERIAL_NUMBER, ATTR_SUGGESTED_AREA as ATTR_SUGGESTED_AREA, ATTR_SW_VERSION as ATTR_SW_VERSION, ATTR_VIA_DEVICE as ATTR_VIA_DEVICE, CONF_DEVICE as CONF_DEVICE, CONF_ENTITY_CATEGORY as CONF_ENTITY_CATEGORY, CONF_ICON as CONF_ICON, CONF_MODEL as CONF_MODEL, CONF_MODEL_ID as CONF_MODEL_ID, CONF_NAME as CONF_NAME, CONF_UNIQUE_ID as CONF_UNIQUE_ID, CONF_VALUE_TEMPLATE as CONF_VALUE_TEMPLATE
16
16
  from homeassistant.core import Event as Event, HassJobType as HassJobType, HomeAssistant as HomeAssistant, callback as callback
17
17
  from homeassistant.helpers import entity_registry as er
18
18
  from homeassistant.helpers.device_registry import DeviceEntry as DeviceEntry, DeviceInfo as DeviceInfo, EventDeviceRegistryUpdatedData as EventDeviceRegistryUpdatedData
@@ -11,7 +11,7 @@ from collections.abc import Callable
11
11
  from dataclasses import dataclass
12
12
  from enum import StrEnum
13
13
  from homeassistant.const import ATTR_ENTITY_ID as ATTR_ENTITY_ID, ATTR_NAME as ATTR_NAME, Platform as Platform
14
- from homeassistant.core import CALLBACK_TYPE as CALLBACK_TYPE, HomeAssistant as HomeAssistant, callback as callback
14
+ from homeassistant.core import CALLBACK_TYPE as CALLBACK_TYPE, callback as callback
15
15
  from homeassistant.exceptions import ServiceValidationError as ServiceValidationError, TemplateError as TemplateError
16
16
  from homeassistant.helpers import template as template
17
17
  from homeassistant.helpers.entity import Entity as Entity
@@ -29,6 +29,8 @@ _LOGGER: Incomplete
29
29
  ATTR_THIS: str
30
30
  PublishPayloadType = str | bytes | int | float | None
31
31
 
32
+ def convert_outgoing_mqtt_payload(payload: PublishPayloadType) -> PublishPayloadType: ...
33
+
32
34
  @dataclass
33
35
  class PublishMessage:
34
36
  topic: str
@@ -84,7 +86,7 @@ class MqttCommandTemplate:
84
86
  _template_state: Incomplete
85
87
  _command_template: Incomplete
86
88
  _entity: Incomplete
87
- def __init__(self, command_template: template.Template | None, *, hass: HomeAssistant | None = None, entity: Entity | None = None) -> None: ...
89
+ def __init__(self, command_template: template.Template | None, *, entity: Entity | None = None) -> None: ...
88
90
  def async_render(self, value: PublishPayloadType = None, variables: TemplateVarsType = None) -> PublishPayloadType: ...
89
91
 
90
92
  class MqttValueTemplateException(TemplateError):
@@ -97,7 +99,7 @@ class MqttValueTemplate:
97
99
  _value_template: Incomplete
98
100
  _config_attributes: Incomplete
99
101
  _entity: Incomplete
100
- def __init__(self, value_template: template.Template | None, *, hass: HomeAssistant | None = None, entity: Entity | None = None, config_attributes: TemplateVarsType = None) -> None: ...
102
+ def __init__(self, value_template: template.Template | None, *, entity: Entity | None = None, config_attributes: TemplateVarsType = None) -> None: ...
101
103
  def async_render_with_possible_json_value(self, payload: ReceivePayloadType, default: ReceivePayloadType | PayloadSentinel = ..., variables: TemplateVarsType = None) -> ReceivePayloadType: ...
102
104
 
103
105
  class EntityTopicState:
@@ -2,7 +2,7 @@ from . import subscription as subscription
2
2
  from .config import MQTT_RW_SCHEMA as MQTT_RW_SCHEMA
3
3
  from .const import CONF_COMMAND_TEMPLATE as CONF_COMMAND_TEMPLATE, CONF_COMMAND_TOPIC as CONF_COMMAND_TOPIC, CONF_PAYLOAD_RESET as CONF_PAYLOAD_RESET, CONF_STATE_TOPIC as CONF_STATE_TOPIC
4
4
  from .mixins import MqttEntity as MqttEntity, async_setup_entity_entry_helper as async_setup_entity_entry_helper
5
- from .models import MqttCommandTemplate as MqttCommandTemplate, MqttValueTemplate as MqttValueTemplate, PublishPayloadType as PublishPayloadType, ReceiveMessage as ReceiveMessage, ReceivePayloadType as ReceivePayloadType
5
+ from .models import MqttCommandTemplate as MqttCommandTemplate, MqttValueTemplate as MqttValueTemplate, PublishPayloadType as PublishPayloadType, ReceiveMessage as ReceiveMessage
6
6
  from .schemas import MQTT_ENTITY_COMMON_SCHEMA as MQTT_ENTITY_COMMON_SCHEMA
7
7
  from _typeshed import Incomplete
8
8
  from collections.abc import Callable as Callable
@@ -12,6 +12,7 @@ from homeassistant.config_entries import ConfigEntry as ConfigEntry
12
12
  from homeassistant.const import CONF_DEVICE_CLASS as CONF_DEVICE_CLASS, CONF_MODE as CONF_MODE, CONF_NAME as CONF_NAME, CONF_OPTIMISTIC as CONF_OPTIMISTIC, CONF_UNIT_OF_MEASUREMENT as CONF_UNIT_OF_MEASUREMENT, CONF_VALUE_TEMPLATE as CONF_VALUE_TEMPLATE
13
13
  from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
14
14
  from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
15
+ from homeassistant.helpers.service_info.mqtt import ReceivePayloadType as ReceivePayloadType
15
16
  from homeassistant.helpers.typing import ConfigType as ConfigType, VolSchemaType as VolSchemaType
16
17
 
17
18
  _LOGGER: Incomplete
@@ -1,7 +1,7 @@
1
1
  from .const import AVAILABILITY_LATEST as AVAILABILITY_LATEST, AVAILABILITY_MODES as AVAILABILITY_MODES, CONF_AVAILABILITY as CONF_AVAILABILITY, CONF_AVAILABILITY_MODE as CONF_AVAILABILITY_MODE, CONF_AVAILABILITY_TEMPLATE as CONF_AVAILABILITY_TEMPLATE, CONF_AVAILABILITY_TOPIC as CONF_AVAILABILITY_TOPIC, CONF_CONFIGURATION_URL as CONF_CONFIGURATION_URL, CONF_CONNECTIONS as CONF_CONNECTIONS, CONF_DEPRECATED_VIA_HUB as CONF_DEPRECATED_VIA_HUB, CONF_ENABLED_BY_DEFAULT as CONF_ENABLED_BY_DEFAULT, CONF_HW_VERSION as CONF_HW_VERSION, CONF_IDENTIFIERS as CONF_IDENTIFIERS, CONF_JSON_ATTRS_TEMPLATE as CONF_JSON_ATTRS_TEMPLATE, CONF_JSON_ATTRS_TOPIC as CONF_JSON_ATTRS_TOPIC, CONF_MANUFACTURER as CONF_MANUFACTURER, CONF_OBJECT_ID as CONF_OBJECT_ID, CONF_ORIGIN as CONF_ORIGIN, CONF_PAYLOAD_AVAILABLE as CONF_PAYLOAD_AVAILABLE, CONF_PAYLOAD_NOT_AVAILABLE as CONF_PAYLOAD_NOT_AVAILABLE, CONF_SERIAL_NUMBER as CONF_SERIAL_NUMBER, CONF_SUGGESTED_AREA as CONF_SUGGESTED_AREA, CONF_SUPPORT_URL as CONF_SUPPORT_URL, CONF_SW_VERSION as CONF_SW_VERSION, CONF_TOPIC as CONF_TOPIC, CONF_VIA_DEVICE as CONF_VIA_DEVICE, DEFAULT_PAYLOAD_AVAILABLE as DEFAULT_PAYLOAD_AVAILABLE, DEFAULT_PAYLOAD_NOT_AVAILABLE as DEFAULT_PAYLOAD_NOT_AVAILABLE
2
2
  from .util import valid_subscribe_topic as valid_subscribe_topic
3
3
  from _typeshed import Incomplete
4
- from homeassistant.const import CONF_DEVICE as CONF_DEVICE, CONF_ENTITY_CATEGORY as CONF_ENTITY_CATEGORY, CONF_ICON as CONF_ICON, CONF_MODEL as CONF_MODEL, CONF_NAME as CONF_NAME, CONF_UNIQUE_ID as CONF_UNIQUE_ID, CONF_VALUE_TEMPLATE as CONF_VALUE_TEMPLATE
4
+ from homeassistant.const import CONF_DEVICE as CONF_DEVICE, CONF_ENTITY_CATEGORY as CONF_ENTITY_CATEGORY, CONF_ICON as CONF_ICON, CONF_MODEL as CONF_MODEL, CONF_MODEL_ID as CONF_MODEL_ID, CONF_NAME as CONF_NAME, CONF_UNIQUE_ID as CONF_UNIQUE_ID, CONF_VALUE_TEMPLATE as CONF_VALUE_TEMPLATE
5
5
  from homeassistant.helpers.entity import ENTITY_CATEGORIES_SCHEMA as ENTITY_CATEGORIES_SCHEMA
6
6
  from homeassistant.helpers.typing import ConfigType as ConfigType
7
7
 
@@ -1,8 +1,8 @@
1
1
  from . import subscription as subscription
2
2
  from .config import MQTT_RW_SCHEMA as MQTT_RW_SCHEMA
3
- from .const import CONF_COMMAND_TEMPLATE as CONF_COMMAND_TEMPLATE, CONF_COMMAND_TOPIC as CONF_COMMAND_TOPIC, CONF_STATE_TOPIC as CONF_STATE_TOPIC
3
+ from .const import CONF_COMMAND_TEMPLATE as CONF_COMMAND_TEMPLATE, CONF_COMMAND_TOPIC as CONF_COMMAND_TOPIC, CONF_OPTIONS as CONF_OPTIONS, CONF_STATE_TOPIC as CONF_STATE_TOPIC
4
4
  from .mixins import MqttEntity as MqttEntity, async_setup_entity_entry_helper as async_setup_entity_entry_helper
5
- from .models import MqttCommandTemplate as MqttCommandTemplate, MqttValueTemplate as MqttValueTemplate, PublishPayloadType as PublishPayloadType, ReceiveMessage as ReceiveMessage, ReceivePayloadType as ReceivePayloadType
5
+ from .models import MqttCommandTemplate as MqttCommandTemplate, MqttValueTemplate as MqttValueTemplate, PublishPayloadType as PublishPayloadType, ReceiveMessage as ReceiveMessage
6
6
  from .schemas import MQTT_ENTITY_COMMON_SCHEMA as MQTT_ENTITY_COMMON_SCHEMA
7
7
  from _typeshed import Incomplete
8
8
  from collections.abc import Callable as Callable
@@ -13,10 +13,10 @@ from homeassistant.const import CONF_NAME as CONF_NAME, CONF_OPTIMISTIC as CONF_
13
13
  from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
14
14
  from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
15
15
  from homeassistant.helpers.restore_state import RestoreEntity as RestoreEntity
16
+ from homeassistant.helpers.service_info.mqtt import ReceivePayloadType as ReceivePayloadType
16
17
  from homeassistant.helpers.typing import ConfigType as ConfigType, VolSchemaType as VolSchemaType
17
18
 
18
19
  _LOGGER: Incomplete
19
- CONF_OPTIONS: str
20
20
  DEFAULT_NAME: str
21
21
  MQTT_SELECT_ATTRIBUTES_BLOCKED: Incomplete
22
22
  PLATFORM_SCHEMA_MODERN: Incomplete
@@ -1,8 +1,8 @@
1
1
  from . import subscription as subscription
2
2
  from .config import MQTT_RO_SCHEMA as MQTT_RO_SCHEMA
3
- from .const import CONF_STATE_TOPIC as CONF_STATE_TOPIC, PAYLOAD_NONE as PAYLOAD_NONE
3
+ from .const import CONF_OPTIONS as CONF_OPTIONS, CONF_STATE_TOPIC as CONF_STATE_TOPIC, PAYLOAD_NONE as PAYLOAD_NONE
4
4
  from .mixins import MqttAvailabilityMixin as MqttAvailabilityMixin, MqttEntity as MqttEntity, async_setup_entity_entry_helper as async_setup_entity_entry_helper
5
- from .models import MqttValueTemplate as MqttValueTemplate, PayloadSentinel as PayloadSentinel, ReceiveMessage as ReceiveMessage, ReceivePayloadType as ReceivePayloadType
5
+ from .models import MqttValueTemplate as MqttValueTemplate, PayloadSentinel as PayloadSentinel, ReceiveMessage as ReceiveMessage
6
6
  from .schemas import MQTT_ENTITY_COMMON_SCHEMA as MQTT_ENTITY_COMMON_SCHEMA
7
7
  from .util import check_state_too_long as check_state_too_long
8
8
  from _typeshed import Incomplete
@@ -15,6 +15,7 @@ from homeassistant.const import CONF_DEVICE_CLASS as CONF_DEVICE_CLASS, CONF_FOR
15
15
  from homeassistant.core import CALLBACK_TYPE as CALLBACK_TYPE, HomeAssistant as HomeAssistant, State as State, callback as callback
16
16
  from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
17
17
  from homeassistant.helpers.event import async_call_later as async_call_later
18
+ from homeassistant.helpers.service_info.mqtt import ReceivePayloadType as ReceivePayloadType
18
19
  from homeassistant.helpers.typing import ConfigType as ConfigType, VolSchemaType as VolSchemaType
19
20
 
20
21
  _LOGGER: Incomplete
@@ -26,7 +27,7 @@ DEFAULT_NAME: str
26
27
  DEFAULT_FORCE_UPDATE: bool
27
28
  _PLATFORM_SCHEMA_BASE: Incomplete
28
29
 
29
- def validate_sensor_state_class_config(config: ConfigType) -> ConfigType: ...
30
+ def validate_sensor_state_and_device_class_config(config: ConfigType) -> ConfigType: ...
30
31
 
31
32
  PLATFORM_SCHEMA_MODERN: Incomplete
32
33
  DISCOVERY_SCHEMA: Incomplete
@@ -52,6 +53,7 @@ class MqttSensor(MqttEntity, RestoreSensor):
52
53
  _attr_force_update: Incomplete
53
54
  _attr_suggested_display_precision: Incomplete
54
55
  _attr_native_unit_of_measurement: Incomplete
56
+ _attr_options: Incomplete
55
57
  _attr_state_class: Incomplete
56
58
  def _setup_from_config(self, config: ConfigType) -> None: ...
57
59
  def _update_state(self, msg: ReceiveMessage) -> None: ...
@@ -2,7 +2,7 @@ from . import subscription as subscription
2
2
  from .config import MQTT_RW_SCHEMA as MQTT_RW_SCHEMA
3
3
  from .const import CONF_COMMAND_TEMPLATE as CONF_COMMAND_TEMPLATE, CONF_COMMAND_TOPIC as CONF_COMMAND_TOPIC, CONF_STATE_TOPIC as CONF_STATE_TOPIC, CONF_STATE_VALUE_TEMPLATE as CONF_STATE_VALUE_TEMPLATE, PAYLOAD_EMPTY_JSON as PAYLOAD_EMPTY_JSON, PAYLOAD_NONE as PAYLOAD_NONE
4
4
  from .mixins import MqttEntity as MqttEntity, async_setup_entity_entry_helper as async_setup_entity_entry_helper
5
- from .models import MqttCommandTemplate as MqttCommandTemplate, MqttValueTemplate as MqttValueTemplate, PublishPayloadType as PublishPayloadType, ReceiveMessage as ReceiveMessage, ReceivePayloadType as ReceivePayloadType
5
+ from .models import MqttCommandTemplate as MqttCommandTemplate, MqttValueTemplate as MqttValueTemplate, PublishPayloadType as PublishPayloadType, ReceiveMessage as ReceiveMessage
6
6
  from .schemas import MQTT_ENTITY_COMMON_SCHEMA as MQTT_ENTITY_COMMON_SCHEMA
7
7
  from _typeshed import Incomplete
8
8
  from collections.abc import Callable as Callable
@@ -13,6 +13,7 @@ from homeassistant.const import CONF_NAME as CONF_NAME, CONF_OPTIMISTIC as CONF_
13
13
  from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
14
14
  from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
15
15
  from homeassistant.helpers.json import json_dumps as json_dumps
16
+ from homeassistant.helpers.service_info.mqtt import ReceivePayloadType as ReceivePayloadType
16
17
  from homeassistant.helpers.template import Template as Template
17
18
  from homeassistant.helpers.typing import ConfigType as ConfigType, TemplateVarsType as TemplateVarsType, VolSchemaType as VolSchemaType
18
19
  from homeassistant.util.json import JSON_DECODE_EXCEPTIONS as JSON_DECODE_EXCEPTIONS, json_loads_object as json_loads_object
@@ -3,7 +3,7 @@ from .config import MQTT_BASE_SCHEMA as MQTT_BASE_SCHEMA
3
3
  from .const import ATTR_DISCOVERY_HASH as ATTR_DISCOVERY_HASH, CONF_QOS as CONF_QOS, CONF_TOPIC as CONF_TOPIC
4
4
  from .discovery import MQTTDiscoveryPayload as MQTTDiscoveryPayload
5
5
  from .mixins import MqttDiscoveryDeviceUpdateMixin as MqttDiscoveryDeviceUpdateMixin, async_handle_schema_error as async_handle_schema_error, async_setup_non_entity_entry_helper as async_setup_non_entity_entry_helper, send_discovery_done as send_discovery_done, update_device as update_device
6
- from .models import DATA_MQTT as DATA_MQTT, MqttValueTemplate as MqttValueTemplate, MqttValueTemplateException as MqttValueTemplateException, ReceiveMessage as ReceiveMessage, ReceivePayloadType as ReceivePayloadType
6
+ from .models import DATA_MQTT as DATA_MQTT, MqttValueTemplate as MqttValueTemplate, MqttValueTemplateException as MqttValueTemplateException, ReceiveMessage as ReceiveMessage
7
7
  from .schemas import MQTT_ENTITY_DEVICE_INFO_SCHEMA as MQTT_ENTITY_DEVICE_INFO_SCHEMA
8
8
  from .subscription import EntitySubscription as EntitySubscription
9
9
  from .util import valid_subscribe_topic as valid_subscribe_topic
@@ -13,6 +13,7 @@ from homeassistant.components import tag as tag
13
13
  from homeassistant.config_entries import ConfigEntry as ConfigEntry
14
14
  from homeassistant.const import CONF_DEVICE as CONF_DEVICE, CONF_VALUE_TEMPLATE as CONF_VALUE_TEMPLATE
15
15
  from homeassistant.core import HassJobType as HassJobType, HomeAssistant as HomeAssistant, callback as callback
16
+ from homeassistant.helpers.service_info.mqtt import ReceivePayloadType as ReceivePayloadType
16
17
  from homeassistant.helpers.typing import ConfigType as ConfigType, DiscoveryInfoType as DiscoveryInfoType
17
18
 
18
19
  _LOGGER: Incomplete
@@ -3,7 +3,7 @@ from . import subscription as subscription
3
3
  from .config import MQTT_RW_SCHEMA as MQTT_RW_SCHEMA
4
4
  from .const import CONF_COMMAND_TEMPLATE as CONF_COMMAND_TEMPLATE, CONF_COMMAND_TOPIC as CONF_COMMAND_TOPIC, CONF_STATE_TOPIC as CONF_STATE_TOPIC
5
5
  from .mixins import MqttEntity as MqttEntity, async_setup_entity_entry_helper as async_setup_entity_entry_helper
6
- from .models import MqttCommandTemplate as MqttCommandTemplate, MqttValueTemplate as MqttValueTemplate, PublishPayloadType as PublishPayloadType, ReceiveMessage as ReceiveMessage, ReceivePayloadType as ReceivePayloadType
6
+ from .models import MqttCommandTemplate as MqttCommandTemplate, MqttValueTemplate as MqttValueTemplate, PublishPayloadType as PublishPayloadType, ReceiveMessage as ReceiveMessage
7
7
  from .schemas import MQTT_ENTITY_COMMON_SCHEMA as MQTT_ENTITY_COMMON_SCHEMA
8
8
  from .util import check_state_too_long as check_state_too_long
9
9
  from _typeshed import Incomplete
@@ -14,6 +14,7 @@ from homeassistant.config_entries import ConfigEntry as ConfigEntry
14
14
  from homeassistant.const import CONF_MODE as CONF_MODE, CONF_NAME as CONF_NAME, CONF_OPTIMISTIC as CONF_OPTIMISTIC, CONF_VALUE_TEMPLATE as CONF_VALUE_TEMPLATE, MAX_LENGTH_STATE_STATE as MAX_LENGTH_STATE_STATE
15
15
  from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
16
16
  from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
17
+ from homeassistant.helpers.service_info.mqtt import ReceivePayloadType as ReceivePayloadType
17
18
  from homeassistant.helpers.typing import ConfigType as ConfigType, VolSchemaType as VolSchemaType
18
19
  from typing import Any
19
20
 
@@ -1,10 +1,11 @@
1
1
  from .. import mqtt as mqtt
2
2
  from .const import CONF_ENCODING as CONF_ENCODING, CONF_QOS as CONF_QOS, CONF_TOPIC as CONF_TOPIC, DEFAULT_ENCODING as DEFAULT_ENCODING, DEFAULT_QOS as DEFAULT_QOS
3
- from .models import MqttCommandTemplate as MqttCommandTemplate, MqttValueTemplate as MqttValueTemplate, PayloadSentinel as PayloadSentinel, PublishPayloadType as PublishPayloadType, ReceiveMessage as ReceiveMessage, ReceivePayloadType as ReceivePayloadType
3
+ from .models import MqttCommandTemplate as MqttCommandTemplate, MqttValueTemplate as MqttValueTemplate, PayloadSentinel as PayloadSentinel, PublishPayloadType as PublishPayloadType, ReceiveMessage as ReceiveMessage
4
4
  from _typeshed import Incomplete
5
5
  from collections.abc import Callable as Callable
6
6
  from homeassistant.const import CONF_PAYLOAD as CONF_PAYLOAD, CONF_PLATFORM as CONF_PLATFORM, CONF_VALUE_TEMPLATE as CONF_VALUE_TEMPLATE
7
7
  from homeassistant.core import CALLBACK_TYPE as CALLBACK_TYPE, HassJob as HassJob, HassJobType as HassJobType, HomeAssistant as HomeAssistant, callback as callback
8
+ from homeassistant.helpers.service_info.mqtt import ReceivePayloadType as ReceivePayloadType
8
9
  from homeassistant.helpers.template import Template as Template
9
10
  from homeassistant.helpers.trigger import TriggerActionType as TriggerActionType, TriggerData as TriggerData, TriggerInfo as TriggerInfo
10
11
  from homeassistant.helpers.typing import ConfigType as ConfigType, TemplateVarsType as TemplateVarsType
@@ -1,6 +1,6 @@
1
1
  from . import subscription as subscription
2
2
  from .config import MQTT_BASE_SCHEMA as MQTT_BASE_SCHEMA
3
- from .const import CONF_COMMAND_TOPIC as CONF_COMMAND_TOPIC, CONF_RETAIN as CONF_RETAIN, CONF_SCHEMA as CONF_SCHEMA, CONF_STATE_TOPIC as CONF_STATE_TOPIC
3
+ from .const import CONF_COMMAND_TOPIC as CONF_COMMAND_TOPIC, CONF_RETAIN as CONF_RETAIN, CONF_STATE_TOPIC as CONF_STATE_TOPIC
4
4
  from .mixins import MqttEntity as MqttEntity, async_setup_entity_entry_helper as async_setup_entity_entry_helper
5
5
  from .models import ReceiveMessage as ReceiveMessage
6
6
  from .schemas import MQTT_ENTITY_COMMON_SCHEMA as MQTT_ENTITY_COMMON_SCHEMA
@@ -17,10 +17,9 @@ from homeassistant.helpers.typing import ConfigType as ConfigType, DiscoveryInfo
17
17
  from homeassistant.util.json import json_loads_object as json_loads_object
18
18
  from typing import Any
19
19
 
20
- LEGACY: str
21
- STATE: str
22
20
  BATTERY: str
23
21
  FAN_SPEED: str
22
+ STATE: str
24
23
  POSSIBLE_STATES: dict[str, str]
25
24
  CONF_SUPPORTED_FEATURES = ATTR_SUPPORTED_FEATURES
26
25
  CONF_PAYLOAD_TURN_ON: str
@@ -54,9 +53,8 @@ DEFAULT_SERVICE_STRINGS: Incomplete
54
53
  _FEATURE_PAYLOADS: Incomplete
55
54
  MQTT_VACUUM_ATTRIBUTES_BLOCKED: Incomplete
56
55
  MQTT_VACUUM_DOCS_URL: str
57
- VACUUM_BASE_SCHEMA: Incomplete
58
- DISCOVERY_SCHEMA: Incomplete
59
56
  PLATFORM_SCHEMA_MODERN: Incomplete
57
+ DISCOVERY_SCHEMA: Incomplete
60
58
 
61
59
  async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: AddEntitiesCallback) -> None: ...
62
60
 
@@ -11,7 +11,6 @@ from mysensors import BaseAsyncGateway as BaseAsyncGateway
11
11
 
12
12
  _LOGGER: Incomplete
13
13
  DATA_HASS_CONFIG: str
14
- CONFIG_SCHEMA: Incomplete
15
14
 
16
15
  async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: ...
17
16
  async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: ...
@@ -3,10 +3,11 @@ from .handler import HANDLERS as HANDLERS
3
3
  from .helpers import discover_mysensors_node as discover_mysensors_node, discover_mysensors_platform as discover_mysensors_platform, on_unload as on_unload, validate_child as validate_child, validate_node as validate_node
4
4
  from _typeshed import Incomplete
5
5
  from collections.abc import Callable as Callable
6
- from homeassistant.components.mqtt import ReceivePayloadType as ReceivePayloadType, async_publish as async_publish, async_subscribe as async_subscribe
6
+ from homeassistant.components.mqtt import async_publish as async_publish, async_subscribe as async_subscribe
7
7
  from homeassistant.config_entries import ConfigEntry as ConfigEntry
8
8
  from homeassistant.const import CONF_DEVICE as CONF_DEVICE, EVENT_HOMEASSISTANT_STOP as EVENT_HOMEASSISTANT_STOP
9
9
  from homeassistant.core import Event as Event, HomeAssistant as HomeAssistant, callback as callback
10
+ from homeassistant.helpers.service_info.mqtt import ReceivePayloadType as ReceivePayloadType
10
11
  from homeassistant.setup import SetupPhases as SetupPhases, async_pause_setup as async_pause_setup
11
12
  from homeassistant.util.unit_system import METRIC_SYSTEM as METRIC_SYSTEM
12
13
  from mysensors import BaseAsyncGateway as BaseAsyncGateway, Message as Message, Sensor as Sensor
@@ -4,7 +4,7 @@ from .helpers import on_unload as on_unload
4
4
  from _typeshed import Incomplete
5
5
  from homeassistant.components.sensor import SensorDeviceClass as SensorDeviceClass, SensorEntity as SensorEntity, SensorEntityDescription as SensorEntityDescription, SensorStateClass as SensorStateClass
6
6
  from homeassistant.config_entries import ConfigEntry as ConfigEntry
7
- from homeassistant.const import DEGREE as DEGREE, LIGHT_LUX as LIGHT_LUX, PERCENTAGE as PERCENTAGE, Platform as Platform, UnitOfApparentPower as UnitOfApparentPower, UnitOfConductivity as UnitOfConductivity, UnitOfElectricCurrent as UnitOfElectricCurrent, UnitOfElectricPotential as UnitOfElectricPotential, UnitOfEnergy as UnitOfEnergy, UnitOfFrequency as UnitOfFrequency, UnitOfLength as UnitOfLength, UnitOfMass as UnitOfMass, UnitOfPower as UnitOfPower, UnitOfSoundPressure as UnitOfSoundPressure, UnitOfTemperature as UnitOfTemperature, UnitOfVolume as UnitOfVolume
7
+ from homeassistant.const import DEGREE as DEGREE, LIGHT_LUX as LIGHT_LUX, PERCENTAGE as PERCENTAGE, Platform as Platform, UnitOfApparentPower as UnitOfApparentPower, UnitOfConductivity as UnitOfConductivity, UnitOfElectricCurrent as UnitOfElectricCurrent, UnitOfElectricPotential as UnitOfElectricPotential, UnitOfEnergy as UnitOfEnergy, UnitOfFrequency as UnitOfFrequency, UnitOfLength as UnitOfLength, UnitOfMass as UnitOfMass, UnitOfPower as UnitOfPower, UnitOfReactivePower as UnitOfReactivePower, UnitOfSoundPressure as UnitOfSoundPressure, UnitOfTemperature as UnitOfTemperature, UnitOfVolume as UnitOfVolume
8
8
  from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
9
9
  from homeassistant.helpers.dispatcher import async_dispatcher_connect as async_dispatcher_connect
10
10
  from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
@@ -2,7 +2,7 @@ import abc
2
2
  from . import api as api
3
3
  from .const import CONF_PROJECT_ID as CONF_PROJECT_ID, CONF_SUBSCRIBER_ID as CONF_SUBSCRIBER_ID, CONF_SUBSCRIBER_ID_IMPORTED as CONF_SUBSCRIBER_ID_IMPORTED, DATA_DEVICE_MANAGER as DATA_DEVICE_MANAGER, DATA_SDM as DATA_SDM, DATA_SUBSCRIBER as DATA_SUBSCRIBER, DOMAIN as DOMAIN
4
4
  from .events import EVENT_NAME_MAP as EVENT_NAME_MAP, NEST_EVENT as NEST_EVENT
5
- from .media_source import async_get_media_event_store as async_get_media_event_store, async_get_media_source_devices as async_get_media_source_devices, async_get_transcoder as async_get_transcoder
5
+ from .media_source import EVENT_MEDIA_API_URL_FORMAT as EVENT_MEDIA_API_URL_FORMAT, EVENT_THUMBNAIL_URL_FORMAT as EVENT_THUMBNAIL_URL_FORMAT, async_get_media_event_store as async_get_media_event_store, async_get_media_source_devices as async_get_media_source_devices, async_get_transcoder as async_get_transcoder
6
6
  from _typeshed import Incomplete
7
7
  from abc import ABC, abstractmethod
8
8
  from aiohttp import web
@@ -10,6 +10,7 @@ from collections.abc import Awaitable, Callable as Callable
10
10
  from google_nest_sdm.device import Device as Device
11
11
  from google_nest_sdm.event import EventMessage as EventMessage
12
12
  from google_nest_sdm.event_media import Media as Media
13
+ from google_nest_sdm.traits import TraitType
13
14
  from homeassistant.auth.permissions.const import POLICY_READ as POLICY_READ
14
15
  from homeassistant.components.camera import Image as Image, img_util as img_util
15
16
  from homeassistant.components.http import KEY_HASS_USER as KEY_HASS_USER
@@ -34,8 +35,10 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: ...
34
35
  class SignalUpdateCallback:
35
36
  _hass: Incomplete
36
37
  _config_reload_cb: Incomplete
37
- def __init__(self, hass: HomeAssistant, config_reload_cb: Callable[[], Awaitable[None]]) -> None: ...
38
+ _config_entry_id: Incomplete
39
+ def __init__(self, hass: HomeAssistant, config_reload_cb: Callable[[], Awaitable[None]], config_entry_id: str) -> None: ...
38
40
  async def async_handle_event(self, event_message: EventMessage) -> None: ...
41
+ def _supported_traits(self, device_id: str) -> list[TraitType]: ...
39
42
 
40
43
  async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: ...
41
44
  async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: ...
@@ -0,0 +1,36 @@
1
+ from .const import DATA_DEVICE_MANAGER as DATA_DEVICE_MANAGER, DOMAIN as DOMAIN
2
+ from .device_info import NestDeviceInfo as NestDeviceInfo
3
+ from .events import EVENT_CAMERA_MOTION as EVENT_CAMERA_MOTION, EVENT_CAMERA_PERSON as EVENT_CAMERA_PERSON, EVENT_CAMERA_SOUND as EVENT_CAMERA_SOUND, EVENT_DOORBELL_CHIME as EVENT_DOORBELL_CHIME, EVENT_NAME_MAP as EVENT_NAME_MAP
4
+ from _typeshed import Incomplete
5
+ from dataclasses import dataclass
6
+ from google_nest_sdm.device import Device as Device
7
+ from google_nest_sdm.device_manager import DeviceManager as DeviceManager
8
+ from google_nest_sdm.event import EventMessage as EventMessage, EventType
9
+ from google_nest_sdm.traits import TraitType
10
+ from homeassistant.components.event import EventDeviceClass as EventDeviceClass, EventEntity as EventEntity, EventEntityDescription as EventEntityDescription
11
+ from homeassistant.config_entries import ConfigEntry as ConfigEntry
12
+ from homeassistant.core import HomeAssistant as HomeAssistant
13
+ from homeassistant.helpers.entity_platform import AddEntitiesCallback as AddEntitiesCallback
14
+
15
+ _LOGGER: Incomplete
16
+
17
+ @dataclass(kw_only=True, frozen=True)
18
+ class NestEventEntityDescription(EventEntityDescription):
19
+ trait_types: list[TraitType]
20
+ api_event_types: list[EventType]
21
+ event_types: list[str]
22
+ def __init__(self, *, key, device_class=..., entity_category=..., entity_registry_enabled_default=..., entity_registry_visible_default=..., force_update=..., icon=..., has_entity_name=..., name=..., translation_key=..., translation_placeholders=..., unit_of_measurement=..., event_types, trait_types, api_event_types) -> None: ...
23
+
24
+ ENTITY_DESCRIPTIONS: Incomplete
25
+
26
+ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback) -> None: ...
27
+
28
+ class NestTraitEventEntity(EventEntity):
29
+ entity_description: NestEventEntityDescription
30
+ _attr_has_entity_name: bool
31
+ _device: Incomplete
32
+ _attr_unique_id: Incomplete
33
+ _attr_device_info: Incomplete
34
+ def __init__(self, entity_description: NestEventEntityDescription, device: Device) -> None: ...
35
+ async def _async_handle_event(self, event_message: EventMessage) -> None: ...
36
+ async def async_added_to_hass(self) -> None: ...
@@ -16,7 +16,6 @@ PLATFORMS: Incomplete
16
16
  ATTR_SYSTEM_MODE: str
17
17
  ATTR_SYSTEM_NAME: str
18
18
  DEFAULT_SCAN_INTERVAL: Incomplete
19
- CONFIG_SCHEMA: Incomplete
20
19
  TASK_TYPE_TO_LISTENER_MAP: dict[str, ListenerKind]
21
20
 
22
21
  def is_uuid(value: str) -> bool: ...
@@ -1,6 +1,6 @@
1
1
  from _typeshed import Incomplete
2
2
  from enum import StrEnum
3
- from homeassistant.const import CONCENTRATION_MICROGRAMS_PER_CUBIC_METER as CONCENTRATION_MICROGRAMS_PER_CUBIC_METER, CONCENTRATION_PARTS_PER_BILLION as CONCENTRATION_PARTS_PER_BILLION, CONCENTRATION_PARTS_PER_MILLION as CONCENTRATION_PARTS_PER_MILLION, LIGHT_LUX as LIGHT_LUX, PERCENTAGE as PERCENTAGE, POWER_VOLT_AMPERE_REACTIVE as POWER_VOLT_AMPERE_REACTIVE, SIGNAL_STRENGTH_DECIBELS as SIGNAL_STRENGTH_DECIBELS, SIGNAL_STRENGTH_DECIBELS_MILLIWATT as SIGNAL_STRENGTH_DECIBELS_MILLIWATT, UnitOfApparentPower as UnitOfApparentPower, UnitOfConductivity as UnitOfConductivity, UnitOfDataRate as UnitOfDataRate, UnitOfElectricCurrent as UnitOfElectricCurrent, UnitOfElectricPotential as UnitOfElectricPotential, UnitOfEnergy as UnitOfEnergy, UnitOfFrequency as UnitOfFrequency, UnitOfInformation as UnitOfInformation, UnitOfIrradiance as UnitOfIrradiance, UnitOfLength as UnitOfLength, UnitOfMass as UnitOfMass, UnitOfPower as UnitOfPower, UnitOfPrecipitationDepth as UnitOfPrecipitationDepth, UnitOfPressure as UnitOfPressure, UnitOfSoundPressure as UnitOfSoundPressure, UnitOfSpeed as UnitOfSpeed, UnitOfTemperature as UnitOfTemperature, UnitOfTime as UnitOfTime, UnitOfVolume as UnitOfVolume, UnitOfVolumeFlowRate as UnitOfVolumeFlowRate, UnitOfVolumetricFlux as UnitOfVolumetricFlux
3
+ from homeassistant.const import CONCENTRATION_MICROGRAMS_PER_CUBIC_METER as CONCENTRATION_MICROGRAMS_PER_CUBIC_METER, CONCENTRATION_PARTS_PER_BILLION as CONCENTRATION_PARTS_PER_BILLION, CONCENTRATION_PARTS_PER_MILLION as CONCENTRATION_PARTS_PER_MILLION, LIGHT_LUX as LIGHT_LUX, PERCENTAGE as PERCENTAGE, SIGNAL_STRENGTH_DECIBELS as SIGNAL_STRENGTH_DECIBELS, SIGNAL_STRENGTH_DECIBELS_MILLIWATT as SIGNAL_STRENGTH_DECIBELS_MILLIWATT, UnitOfApparentPower as UnitOfApparentPower, UnitOfConductivity as UnitOfConductivity, UnitOfDataRate as UnitOfDataRate, UnitOfElectricCurrent as UnitOfElectricCurrent, UnitOfElectricPotential as UnitOfElectricPotential, UnitOfEnergy as UnitOfEnergy, UnitOfFrequency as UnitOfFrequency, UnitOfInformation as UnitOfInformation, UnitOfIrradiance as UnitOfIrradiance, UnitOfLength as UnitOfLength, UnitOfMass as UnitOfMass, UnitOfPower as UnitOfPower, UnitOfPrecipitationDepth as UnitOfPrecipitationDepth, UnitOfPressure as UnitOfPressure, UnitOfReactivePower as UnitOfReactivePower, UnitOfSoundPressure as UnitOfSoundPressure, UnitOfSpeed as UnitOfSpeed, UnitOfTemperature as UnitOfTemperature, UnitOfTime as UnitOfTime, UnitOfVolume as UnitOfVolume, UnitOfVolumeFlowRate as UnitOfVolumeFlowRate, UnitOfVolumetricFlux as UnitOfVolumetricFlux
4
4
  from homeassistant.helpers.deprecation import DeprecatedConstantEnum as DeprecatedConstantEnum, all_with_deprecated_constants as all_with_deprecated_constants, check_if_deprecated_constant as check_if_deprecated_constant, dir_with_deprecated_constants as dir_with_deprecated_constants
5
5
  from homeassistant.util.unit_conversion import BaseUnitConverter as BaseUnitConverter, TemperatureConverter as TemperatureConverter, VolumeFlowRateConverter as VolumeFlowRateConverter
6
6
  from typing import Final
@@ -1,6 +1,6 @@
1
1
  from . import websocket_api as websocket_api
2
2
  from .const import DOMAIN as DOMAIN
3
- from .util import OTBRData as OTBRData, update_issues as update_issues
3
+ from .util import GetBorderAgentIdNotSupported as GetBorderAgentIdNotSupported, OTBRData as OTBRData, update_issues as update_issues, update_unique_id as update_unique_id
4
4
  from _typeshed import Incomplete
5
5
  from homeassistant.components.thread import async_add_dataset as async_add_dataset
6
6
  from homeassistant.config_entries import ConfigEntry as ConfigEntry
@@ -9,10 +9,11 @@ from homeassistant.exceptions import ConfigEntryNotReady as ConfigEntryNotReady,
9
9
  from homeassistant.helpers.aiohttp_client import async_get_clientsession as async_get_clientsession
10
10
  from homeassistant.helpers.typing import ConfigType as ConfigType
11
11
 
12
+ _LOGGER: Incomplete
12
13
  CONFIG_SCHEMA: Incomplete
14
+ OTBRConfigEntry = ConfigEntry[OTBRData]
13
15
 
14
16
  async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: ...
15
- async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: ...
16
- async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: ...
17
- async def async_reload_entry(hass: HomeAssistant, entry: ConfigEntry) -> None: ...
18
- async def async_get_active_dataset_tlvs(hass: HomeAssistant) -> bytes | None: ...
17
+ async def async_setup_entry(hass: HomeAssistant, entry: OTBRConfigEntry) -> bool: ...
18
+ async def async_unload_entry(hass: HomeAssistant, entry: OTBRConfigEntry) -> bool: ...
19
+ async def async_reload_entry(hass: HomeAssistant, entry: OTBRConfigEntry) -> None: ...
@@ -1,3 +1,5 @@
1
+ import python_otbr_api
2
+ from . import OTBRConfigEntry as OTBRConfigEntry
1
3
  from .const import DEFAULT_CHANNEL as DEFAULT_CHANNEL, DOMAIN as DOMAIN
2
4
  from .util import compose_default_network_name as compose_default_network_name, generate_random_pan_id as generate_random_pan_id, get_allowed_channel as get_allowed_channel
3
5
  from _typeshed import Incomplete
@@ -11,11 +13,15 @@ from homeassistant.helpers.aiohttp_client import async_get_clientsession as asyn
11
13
 
12
14
  _LOGGER: Incomplete
13
15
 
16
+ class AlreadyConfigured(HomeAssistantError): ...
17
+
14
18
  def _is_yellow(hass: HomeAssistant) -> bool: ...
15
19
  async def _title(hass: HomeAssistant, discovery_info: HassioServiceInfo) -> str: ...
16
20
 
17
21
  class OTBRConfigFlow(ConfigFlow, domain=DOMAIN):
18
22
  VERSION: int
19
- async def _connect_and_set_dataset(self, otbr_url: str) -> None: ...
23
+ async def _set_dataset(self, api: python_otbr_api.OTBR, otbr_url: str) -> None: ...
24
+ async def _is_border_agent_id_configured(self, border_agent_id: bytes) -> bool: ...
25
+ async def _connect_and_configure_router(self, otbr_url: str) -> bytes: ...
20
26
  async def async_step_user(self, user_input: dict[str, str] | None = None) -> ConfigFlowResult: ...
21
27
  async def async_step_hassio(self, discovery_info: HassioServiceInfo) -> ConfigFlowResult: ...
@@ -1,13 +1,17 @@
1
- from . import DOMAIN as DOMAIN
1
+ from . import OTBRConfigEntry as OTBRConfigEntry
2
+ from .const import DOMAIN as DOMAIN
2
3
  from .util import OTBRData as OTBRData
3
4
  from _typeshed import Incomplete
5
+ from collections.abc import Callable as Callable, Coroutine
4
6
  from homeassistant.components.homeassistant_hardware.silabs_multiprotocol_addon import is_multiprotocol_url as is_multiprotocol_url
5
7
  from homeassistant.components.thread import async_add_dataset as async_add_dataset
6
8
  from homeassistant.core import HomeAssistant as HomeAssistant
7
9
  from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
10
+ from typing import Any, Concatenate
8
11
 
9
12
  _LOGGER: Incomplete
10
13
 
11
- async def async_change_channel(hass: HomeAssistant, channel: int, delay: float) -> None: ...
12
- async def async_get_channel(hass: HomeAssistant) -> int | None: ...
13
- async def async_using_multipan(hass: HomeAssistant) -> bool: ...
14
+ def async_get_otbr_data(retval: _R_Def) -> Callable[[Callable[Concatenate[HomeAssistant, OTBRData, _P], Coroutine[Any, Any, _R]]], Callable[Concatenate[HomeAssistant, _P], Coroutine[Any, Any, _R | _R_Def]]]: ...
15
+ async def async_change_channel(hass: HomeAssistant, data: OTBRData, channel: int, delay: float) -> None: ...
16
+ async def async_get_channel(hass: HomeAssistant, data: OTBRData) -> int | None: ...
17
+ async def async_using_multipan(hass: HomeAssistant, data: OTBRData) -> bool: ...
@@ -1,9 +1,11 @@
1
1
  import dataclasses
2
2
  import python_otbr_api
3
+ from . import OTBRConfigEntry as OTBRConfigEntry
3
4
  from .const import DOMAIN as DOMAIN
4
5
  from _typeshed import Incomplete
5
6
  from collections.abc import Callable as Callable, Coroutine
6
7
  from homeassistant.components.homeassistant_hardware.silabs_multiprotocol_addon import MultiprotocolAddonManager as MultiprotocolAddonManager, get_multiprotocol_addon_manager as get_multiprotocol_addon_manager, is_multiprotocol_url as is_multiprotocol_url, multi_pan_addon_using_device as multi_pan_addon_using_device
8
+ from homeassistant.config_entries import SOURCE_USER as SOURCE_USER
7
9
  from homeassistant.core import HomeAssistant as HomeAssistant
8
10
  from homeassistant.exceptions import HomeAssistantError as HomeAssistantError
9
11
  from typing import Any, Concatenate
@@ -14,6 +16,8 @@ INFO_URL_YELLOW: str
14
16
  INSECURE_NETWORK_KEYS: Incomplete
15
17
  INSECURE_PASSPHRASES: Incomplete
16
18
 
19
+ class GetBorderAgentIdNotSupported(HomeAssistantError): ...
20
+
17
21
  def compose_default_network_name(pan_id: int) -> str: ...
18
22
  def generate_random_pan_id() -> int: ...
19
23
  def _handle_otbr_error(func: Callable[Concatenate[OTBRData, _P], Coroutine[Any, Any, _R]]) -> Callable[Concatenate[OTBRData, _P], Coroutine[Any, Any, _R]]: ...
@@ -23,8 +27,8 @@ class OTBRData:
23
27
  url: str
24
28
  api: python_otbr_api.OTBR
25
29
  entry_id: str
26
- async def factory_reset(self) -> None: ...
27
- async def get_border_agent_id(self) -> bytes | None: ...
30
+ async def factory_reset(self, hass: HomeAssistant) -> None: ...
31
+ async def get_border_agent_id(self) -> bytes: ...
28
32
  async def set_enabled(self, enabled: bool) -> None: ...
29
33
  async def get_active_dataset(self) -> python_otbr_api.ActiveDataSet | None: ...
30
34
  async def get_active_dataset_tlvs(self) -> bytes | None: ...
@@ -40,3 +44,4 @@ async def get_allowed_channel(hass: HomeAssistant, otbr_url: str) -> int | None:
40
44
  async def _warn_on_channel_collision(hass: HomeAssistant, otbrdata: OTBRData, dataset_tlvs: bytes) -> None: ...
41
45
  def _warn_on_default_network_settings(hass: HomeAssistant, otbrdata: OTBRData, dataset_tlvs: bytes) -> None: ...
42
46
  async def update_issues(hass: HomeAssistant, otbrdata: OTBRData, dataset_tlvs: bytes) -> None: ...
47
+ async def update_unique_id(hass: HomeAssistant, entry: OTBRConfigEntry | None, border_agent_id: bytes) -> None: ...
@@ -1,3 +1,4 @@
1
+ from . import OTBRConfigEntry as OTBRConfigEntry
1
2
  from .const import DEFAULT_CHANNEL as DEFAULT_CHANNEL, DOMAIN as DOMAIN
2
3
  from .util import OTBRData as OTBRData, compose_default_network_name as compose_default_network_name, generate_random_pan_id as generate_random_pan_id, get_allowed_channel as get_allowed_channel, update_issues as update_issues
3
4
  from collections.abc import Callable as Callable, Coroutine
@@ -1,7 +1,7 @@
1
1
  from .. import OverkizDataUpdateCoordinator as OverkizDataUpdateCoordinator
2
2
  from ..entity import OverkizEntity as OverkizEntity
3
3
  from _typeshed import Incomplete
4
- from homeassistant.components.water_heater import STATE_ECO as STATE_ECO, STATE_OFF as STATE_OFF, STATE_PERFORMANCE as STATE_PERFORMANCE, WaterHeaterEntity as WaterHeaterEntity, WaterHeaterEntityFeature as WaterHeaterEntityFeature
4
+ from homeassistant.components.water_heater import STATE_ECO as STATE_ECO, STATE_ELECTRIC as STATE_ELECTRIC, STATE_OFF as STATE_OFF, STATE_PERFORMANCE as STATE_PERFORMANCE, WaterHeaterEntity as WaterHeaterEntity, WaterHeaterEntityFeature as WaterHeaterEntityFeature
5
5
  from homeassistant.const import ATTR_TEMPERATURE as ATTR_TEMPERATURE, UnitOfTemperature as UnitOfTemperature
6
6
  from typing import Any
7
7
 
@@ -11,7 +11,6 @@ from homeassistant.helpers.device_registry import DeviceInfo as DeviceInfo
11
11
  from homeassistant.helpers.update_coordinator import CoordinatorEntity as CoordinatorEntity, DataUpdateCoordinator as DataUpdateCoordinator, UpdateFailed as UpdateFailed
12
12
 
13
13
  _LOGGER: Incomplete
14
- CONFIG_SCHEMA: Incomplete
15
14
  PLATFORMS: Incomplete
16
15
  PiHoleConfigEntry = ConfigEntry[PiHoleData]
17
16
 
@@ -11,7 +11,6 @@ from homeassistant.helpers.update_coordinator import DataUpdateCoordinator as Da
11
11
  from homeassistant.util.network import is_ip_address as is_ip_address
12
12
  from tesla_powerwall import Powerwall
13
13
 
14
- CONFIG_SCHEMA: Incomplete
15
14
  PLATFORMS: Incomplete
16
15
  _LOGGER: Incomplete
17
16
  API_CHANGED_ERROR_BODY: str