mirror of
https://github.com/geoffdavis/esphome-mitsubishiheatpump
synced 2024-08-30 18:12:13 +00:00
Merge branch 'develop' into unformat-select
This commit is contained in:
commit
d42322e6a9
35
README.md
35
README.md
@ -376,7 +376,9 @@ climate:
|
||||
`UART0`, `UART1`, and `UART2` are all valid choices. Default: `UART0`
|
||||
* `baud_rate` (_Optional_): Serial BAUD rate used to communicate with the
|
||||
HeatPump. Most systems use the default value of `4800` baud, but some use
|
||||
`2400` or `9600`. Some ESP32 boards will require the baud_rate setting if
|
||||
`2400` or `9600`. Check [here](https://github.com/SwiCago/HeatPump/issues/13)
|
||||
to find discussion of whether your particular model requires a non-default baud rate.
|
||||
Some ESP32 boards will require the baud_rate setting if
|
||||
hardware_uart is specified. Default: `4800`.
|
||||
* `rx_pin` (_Optional_): pin number to use as RX for the specified hardware
|
||||
UART (ESP32 only - ESP8266 hardware UART's pins aren't configurable).
|
||||
@ -386,12 +388,14 @@ climate:
|
||||
component polls the heatpump hardware, in milliseconds. Maximum usable value
|
||||
is 9 seconds due to underlying issues with the HeatPump library. Default: 500ms
|
||||
* `supports` (_Optional_): Supported features for the device.
|
||||
** `mode` (_Optional_, list): Supported climate modes for the HeatPump. Default:
|
||||
* `mode` (_Optional_, list): Supported climate modes for the HeatPump. Default:
|
||||
`['HEAT_COOL', 'COOL', 'HEAT', 'DRY', 'FAN_ONLY']`
|
||||
** `fan_mode` (_Optional_, list): Supported fan speeds for the HeatPump.
|
||||
* `fan_mode` (_Optional_, list): Supported fan speeds for the HeatPump.
|
||||
Default: `['AUTO', 'DIFFUSE', 'LOW', 'MEDIUM', 'MIDDLE', 'HIGH']`
|
||||
** `swing_mode` (_Optional_, list): Supported fan swing modes. Most Mitsubishi
|
||||
* `swing_mode` (_Optional_, list): Supported fan swing modes. Most Mitsubishi
|
||||
units only support the default. Default: `['OFF', 'VERTICAL', 'HORIZONTAL', 'BOTH']`
|
||||
* `swing_mode` (_Optional_, list): Supported fan swing modes. Most Mitsubishi
|
||||
units only support the default. Default: `['OFF', 'VERTICAL']`
|
||||
* `remote_temperature_operating_timeout_minutes` (_Optional_): The number of
|
||||
minutes before a set_remote_temperature request becomes stale, while the
|
||||
heatpump is heating or cooling. Unless a new set_remote_temperature
|
||||
@ -420,9 +424,11 @@ climate:
|
||||
|
||||
It is possible to use an external temperature sensor to tell the heat pump what
|
||||
the room temperature is, rather than relying on its internal temperature
|
||||
sensor. You can do this by calling `set_remote_temperature(float temp)` on the
|
||||
`mitsubishi_heatpump` object in a lambda. Note that you can call
|
||||
`set_remote_temperature(0)` to switch back to the internal temperature sensor.
|
||||
sensor. This is helpful if you want to make sure that a particular room, or part
|
||||
of the room, reaches the desired temperature—rather than just the area near the
|
||||
heat pump or the thermostat. You can do this by calling `set_remote_temperature(float temp)`
|
||||
on the `mitsubishi_heatpump` object in a lambda. (If needed, you can call
|
||||
`set_remote_temperature(0)` to switch back to the internal temperature sensor.)
|
||||
|
||||
There are several ways you could make use of this functionality. One is to use
|
||||
a sensor automation:
|
||||
@ -434,7 +440,7 @@ climate:
|
||||
id: hp
|
||||
|
||||
sensor:
|
||||
# You could use a Bluetooth temperature sensor
|
||||
# You could use a Bluetooth temperature sensor as the source...
|
||||
- platform: atc_mithermometer
|
||||
mac_address: "XX:XX:XX:XX:XX:XX"
|
||||
temperature:
|
||||
@ -443,7 +449,7 @@ sensor:
|
||||
then:
|
||||
- lambda: 'id(hp).set_remote_temperature(x);'
|
||||
|
||||
# Or you could use a HomeAssistant sensor
|
||||
# ...or you could use a Home Assistant sensor as the source
|
||||
- platform: homeassistant
|
||||
name: "Temperature Sensor From Home Assistant"
|
||||
entity_id: sensor.temperature_sensor
|
||||
@ -451,10 +457,17 @@ sensor:
|
||||
then:
|
||||
- lambda: 'id(hp).set_remote_temperature(x);'
|
||||
```
|
||||
One issue that you might have here is that, after some amount of time with no update from the
|
||||
external temperature sensor, the heat pump will revert back to its internal temperature.
|
||||
You can prevent this by [adding a `heartbeat` filter](https://github.com/geoffdavis/esphome-mitsubishiheatpump/issues/31#issuecomment-1207115352)
|
||||
to the sensor, which will keep reminding the heat pump of the external sensor value.
|
||||
|
||||
Alternatively you could define a
|
||||
Also, if your external sensor is in Fahrenheit, you will have to [convert the value to Celsius](https://github.com/geoffdavis/esphome-mitsubishiheatpump/issues/31#issuecomment-1207115352).
|
||||
|
||||
|
||||
Alternatively, you could define a
|
||||
[service](https://www.esphome.io/components/api.html#user-defined-services)
|
||||
that HomeAssistant can call:
|
||||
that Home Assistant can call:
|
||||
|
||||
```yaml
|
||||
api:
|
||||
|
@ -330,7 +330,7 @@ void MitsubishiHeatPump::control(const climate::ClimateCall &call) {
|
||||
|
||||
//const char* FAN_MAP[6] = {"AUTO", "QUIET", "1", "2", "3", "4"};
|
||||
if (call.get_fan_mode().has_value()) {
|
||||
ESP_LOGV("control", "Requested fan mode is %s", *call.get_fan_mode());
|
||||
ESP_LOGV("control", "Requested fan mode is %d", *call.get_fan_mode());
|
||||
this->fan_mode = *call.get_fan_mode();
|
||||
switch(*call.get_fan_mode()) {
|
||||
case climate::CLIMATE_FAN_OFF:
|
||||
@ -368,7 +368,7 @@ void MitsubishiHeatPump::control(const climate::ClimateCall &call) {
|
||||
|
||||
//const char* VANE_MAP[7] = {"AUTO", "1", "2", "3", "4", "5", "SWING"};
|
||||
if (call.get_swing_mode().has_value()) {
|
||||
ESP_LOGV(TAG, "control - requested swing mode is %s",
|
||||
ESP_LOGD(TAG, "control - requested swing mode is %d",
|
||||
*call.get_swing_mode());
|
||||
|
||||
this->swing_mode = *call.get_swing_mode();
|
||||
@ -488,7 +488,7 @@ void MitsubishiHeatPump::hpSettingsChanged() {
|
||||
} else { //case "AUTO" or default:
|
||||
this->fan_mode = climate::CLIMATE_FAN_AUTO;
|
||||
}
|
||||
ESP_LOGI(TAG, "Fan mode is: %i", this->fan_mode);
|
||||
ESP_LOGI(TAG, "Fan mode is: %i", this->fan_mode.value_or(-1));
|
||||
|
||||
/* ******** HANDLE MITSUBISHI VANE CHANGES ********
|
||||
* const char* VANE_MAP[7] = {"AUTO", "1", "2", "3", "4", "5", "SWING"};
|
||||
|
Loading…
Reference in New Issue
Block a user