Move Blinds to API
This commit is contained in:
@@ -20,6 +20,11 @@ esp32:
|
|||||||
packages:
|
packages:
|
||||||
device_base: !include templates/esp32-poe.yaml
|
device_base: !include templates/esp32-poe.yaml
|
||||||
|
|
||||||
|
# Also act as a BT proxy due to convenient location.
|
||||||
|
#btproxy: !include templates/btproxy.yaml
|
||||||
|
# Allow HA to use our proxy.
|
||||||
|
api: !include templates/api.yaml
|
||||||
|
|
||||||
external_components:
|
external_components:
|
||||||
# Path is relative to the main YAML file, not this device_base template!
|
# Path is relative to the main YAML file, not this device_base template!
|
||||||
- source: components
|
- source: components
|
||||||
|
|||||||
@@ -30,10 +30,14 @@ void SomfyRTSCover::dump_config() {
|
|||||||
|
|
||||||
cover::CoverTraits SomfyRTSCover::get_traits() {
|
cover::CoverTraits SomfyRTSCover::get_traits() {
|
||||||
auto traits = cover::CoverTraits();
|
auto traits = cover::CoverTraits();
|
||||||
|
|
||||||
traits.set_is_assumed_state(true);
|
traits.set_is_assumed_state(true);
|
||||||
|
traits.set_supports_stop(true);
|
||||||
|
|
||||||
traits.set_supports_position(false);
|
traits.set_supports_position(false);
|
||||||
traits.set_supports_tilt(false);
|
traits.set_supports_tilt(false);
|
||||||
traits.set_supports_toggle(false);
|
traits.set_supports_toggle(false);
|
||||||
|
|
||||||
return traits;
|
return traits;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,8 +74,9 @@ void SomfyRTSCover::setup() {
|
|||||||
},
|
},
|
||||||
/*qos=*/1 /* (at least once) */);
|
/*qos=*/1 /* (at least once) */);
|
||||||
} else {
|
} else {
|
||||||
|
this->rolling_code_ = 0;
|
||||||
|
this->mark_failed("Missing rolling_code");
|
||||||
ESP_LOGE(TAG, "No rolling code in flash, and MQTT client unavailable");
|
ESP_LOGE(TAG, "No rolling code in flash, and MQTT client unavailable");
|
||||||
rolling_code_ = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user