esphome-docs/components/climate/bedjet.rst

192 lines
6.0 KiB
ReStructuredText
Raw Normal View History

BedJet
======
.. seo::
:description: Instructions for setting up a BedJet climate device.
:image: bedjet.png
2022-08-09 00:14:41 +02:00
The ``bedjet`` component allows you to communicate with a BedJet V3 Climate Comfort
Sleep System.
This component supports the following functionality:
- Set the operating mode: off, heat, cool, turbo (boost)
- Set the desired target temperature
- Set the desired fan speed
- Start one of the saved memory presets, including "Biorhythm" programs
- Show the current status of the BedJet
2022-08-09 00:14:41 +02:00
This component uses the BLE peripheral on an ESP32, so you also need to enable
this component. Please see the :doc:`/components/ble_client` docs for how to discover the MAC
address of your BedJet device, or you can find the list of paired MAC addresses in
the "DEVICE LIST" section of the BedJet mobile application.
2022-08-09 00:14:41 +02:00
Component/Hub
-------------
This component is a global hub that maintains the connection to the BedJet device
and delegates status updates to individual platform components.
.. code-block:: yaml
2022-08-09 00:14:41 +02:00
esp32_ble_tracker:
ble_client:
2022-08-09 00:14:41 +02:00
- mac_address: C4:4F:33:00:00:01
id: bedjet_ble_id1
2022-08-09 00:14:41 +02:00
bedjet:
- id: bedjet_1
ble_client_id: bedjet_ble_id1
Configuration variables:
2022-08-09 00:14:41 +02:00
************************
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **ble_client_id** (**Required**, :ref:`config-id`): The ID of the BLE Client.
- **time_id** (*Optional*, :ref:`config-id`): The ID of a :ref:`Time Component <time>` which
can be used to set the time on the BedJet device.
2022-08-09 00:14:41 +02:00
- **update_interval** (*Optional*, :ref:`config-time`): The interval to dispatch status
changes to child components. Defaults to ``5s``. Each child component can decide whether to
publish its own updated state on this interval, or use another (longer) update interval to
throttle its own updates.
lambda calls
************
From :ref:`lambdas <config-lambda>`, you can call methods to do some advanced stuff.
- ``.upgrade_firmware``: Check for and install updated BedJet firmware.
.. code-block:: yaml
button:
- platform: template
2022-08-09 00:14:41 +02:00
name: "Check Bedjet(1) Firmware"
on_press:
then:
- lambda: |-
2022-08-09 00:14:41 +02:00
id(bedjet_1).upgrade_firmware();
2022-08-31 03:53:23 +02:00
- ``.send_local_time``: If `time_id` is set, attempt to sync the clock now.
.. code-block:: yaml
button:
- platform: template
name: "Sync Clock"
on_press:
then:
- lambda: |-
id(my_bedjet_fan).send_local_time();
- ``.set_clock``: Set the BedJet clock to a specified time; works with or without a `time_id`.
.. code-block:: yaml
button:
- platform: template
name: "Set Clock to 10:10pm"
on_press:
then:
- lambda: |-
id(my_bedjet_fan).set_clock(22, 10);
``bedjet`` Climate
------------------
2022-08-09 00:14:41 +02:00
2022-08-31 03:55:05 +02:00
The ``climate`` platform exposes the BedJet's climate-related functionality, including
2022-08-09 00:14:41 +02:00
setting the mode and target temperature.
.. code-block:: yaml
climate:
- platform: bedjet
id: my_bedjet_climate_entity
name: "My BedJet"
bedjet_id: bedjet_1
Configuration variables:
************************
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **name** (**Required**, string): The name of the climate device.
- **bedjet_id** (**Required**, :ref:`config-id`): The ID of the Bedjet component.
- **heat_mode** (*Optional*, string): The primary heating mode to use for ``HVACMode.HEAT``:
2022-08-31 03:55:05 +02:00
- ``heat`` (Default) - Setting ``hvac_mode=heat`` uses the BedJet "HEAT" mode.
- ``extended`` - Setting ``hvac_mode=heat`` uses BedJet "EXT HEAT" mode.
Whichever is not selected will be made available as a custom preset.
2022-08-09 00:14:41 +02:00
- All other options from :ref:`Climate <config-climate>`.
2022-08-31 03:53:23 +02:00
``bedjet`` Fan
--------------
2022-08-31 03:53:23 +02:00
The `fan` platform exposes the BedJet's fan-related functionality, including
on/off and speed control.
2022-08-31 03:53:23 +02:00
When the BedJet is already on, turning the Fan component off will set the BedJet unit's mode to
``OFF``. If it was not already on, it will be turned on to mode ``FAN_ONLY``.
2022-08-31 03:53:23 +02:00
.. code-block:: yaml
2022-08-31 03:53:23 +02:00
fan:
- platform: bedjet
id: my_bedjet_fan_entity
name: "My BedJet Fan"
bedjet_id: bedjet_1
2022-08-31 03:53:23 +02:00
Configuration variables:
************************
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **name** (**Required**, string): The name of the fan device.
- **bedjet_id** (**Required**, :ref:`config-id`): The ID of the Bedjet component.
- Other options from :ref:`Fan <config-fan>`.
Known issues:
-------------
.. warning::
BedJet V2 and other devices are not currently supported. Only BedJet V3 is supported.
.. note::
Only one client can be connected to the BedJet BLE service at a time, so you cannot
use the BedJet mobile app to monitor or control the BedJet device while this component
is connected. To use the mobile app, you should disconnect the ESP client first.
To set up a (dis-)connect switch, see :doc:`/components/switch/ble_client`.
.. note::
When more than one device is configured and connected, the ESP device may become
overwhelmed and lead to timeouts while trying to install an updated version of the
configuration. If this occurs, see the previous note about adding disconnect switches,
and toggle those off while performing the installation. This will free up resources
on the ESP and allow the installation to complete.
Additionally, you may use an :ref:`ota.on_begin <ota-on_begin>` :ref:`Automation<automation>`
to do this automatically:
.. code-block:: yaml
ota:
on_begin:
then:
- logger.log: "Disconnecting clients for OTA update..."
- switch.turn_off: bedjet_1_monitor
- switch.turn_off: bedjet_2_monitor
See Also
--------
- :doc:`/components/ble_client`
- :doc:`/components/climate/index`
- :apiref:`bedjet/bedjet.h`
- :ghedit:`Edit`