mirror of
https://github.com/esphome/esphome.git
synced 2026-10-14 10:12:52 +00:00
[toshiba] Add RAS-B10N3KV2 model support (#17550)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: Petr Helebrant <petr@helebrant.cz> Co-authored-by: longerCZE <72692179+longerCZE@users.noreply.github.com> Co-authored-by: J. Nick Koston <nick@home-assistant.io> Signed-off-by: Petr Helebrant <petr@helebrant.cz>
This commit is contained in:
co-authored by
Claude Fable 5
pre-commit-ci-lite[bot]
Petr Helebrant
longerCZE
J. Nick Koston
parent
377a43c5be
commit
fdf1752307
@@ -16,6 +16,7 @@ MODELS = {
|
||||
"RAC-PT1411HWRU-C": Model.MODEL_RAC_PT1411HWRU_C,
|
||||
"RAC-PT1411HWRU-F": Model.MODEL_RAC_PT1411HWRU_F,
|
||||
"RAS-2819T": Model.MODEL_RAS_2819T,
|
||||
"RAS-B10N3KV2": Model.MODEL_RAS_B10N3KV2,
|
||||
"SEIYA": Model.MODEL_SEIYA,
|
||||
}
|
||||
|
||||
|
||||
@@ -183,10 +183,23 @@ static const ToshibaTimings TOSHIBA_TIMINGS PROGMEM = {TOSHIBA_HEADER_MARK,
|
||||
TOSHIBA_GAP_SPACE,
|
||||
true};
|
||||
static const ToshibaTimings SEIYA_TIMINGS PROGMEM = {4630, 4450, 625, 490, 1570, 5830, false};
|
||||
// The RAS-B13 remote family does not accept the generic timings; these are IRremoteESP8266's TOSHIBA_AC values
|
||||
static const ToshibaTimings RAS_B10N3KV2_TIMINGS PROGMEM = {4400, 4300, 580, 490, 1600, 7400, true};
|
||||
|
||||
static ToshibaTimings timings_for(Model model) {
|
||||
const ToshibaTimings *source = &TOSHIBA_TIMINGS;
|
||||
switch (model) {
|
||||
case MODEL_SEIYA:
|
||||
source = &SEIYA_TIMINGS;
|
||||
break;
|
||||
case MODEL_RAS_B10N3KV2:
|
||||
source = &RAS_B10N3KV2_TIMINGS;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ToshibaTimings timings;
|
||||
progmem_memcpy(&timings, model == MODEL_SEIYA ? &SEIYA_TIMINGS : &TOSHIBA_TIMINGS, sizeof(timings));
|
||||
progmem_memcpy(&timings, source, sizeof(timings));
|
||||
return timings;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ enum Model {
|
||||
MODEL_RAC_PT1411HWRU_F = 2, // Temperature range is from 16 to 30
|
||||
MODEL_RAS_2819T = 3, // RAS-2819T protocol variant, temperature range 18 to 30
|
||||
MODEL_SEIYA = 4, // Seiya family (RAS-B13E2KVG-E etc.), generic frame with a swing byte
|
||||
MODEL_RAS_B10N3KV2 = 5, // RAS-B13 remote family, generic frame with IRremoteESP8266's TOSHIBA_AC timings
|
||||
};
|
||||
|
||||
// Supported temperature ranges
|
||||
@@ -72,7 +73,7 @@ class ToshibaClimate final : public climate_ir::ClimateIR {
|
||||
return TOSHIBA_GENERIC_TEMP_C_MAX; // Default to GENERIC for unknown models
|
||||
}
|
||||
climate::ClimateSwingModeMask toshiba_swing_modes_() {
|
||||
if (this->model_ == MODEL_GENERIC)
|
||||
if (this->model_ == MODEL_GENERIC || this->model_ == MODEL_RAS_B10N3KV2)
|
||||
return climate::ClimateSwingModeMask();
|
||||
if (this->model_ == MODEL_SEIYA) {
|
||||
// No captured code stops the swing, so OFF is not offered; the remote only selects a direction
|
||||
|
||||
@@ -2,3 +2,7 @@ climate:
|
||||
- platform: toshiba
|
||||
name: Toshiba Climate
|
||||
transmitter_id: xmitr
|
||||
- platform: toshiba
|
||||
name: RAS-B10N3KV2 Climate
|
||||
model: RAS-B10N3KV2
|
||||
transmitter_id: xmitr
|
||||
|
||||
Reference in New Issue
Block a user