Compare commits

..
Author SHA1 Message Date
J. Nick Koston de42809df3 Merge remote-tracking branch 'origin/apply-publish-on-success' into pcm5122-apply-switch 2026-10-26 07:28:20 -10:00
J. Nick Koston c04cdea1a0 [core] Build the on_success condition from the call expression and list the publish modes once 2026-10-26 07:27:55 -10:00
J. Nick Koston f2d1aca8cc [pcm5122] Publish the power switches with publish="on_success" 2026-10-26 07:27:34 -10:00
J. Nick Koston a52336ee74 Merge remote-tracking branch 'origin/pcm5122-switch-tests' into pcm5122-apply-switch 2026-10-26 07:26:00 -10:00
J. Nick Koston 772be625b5 Merge remote-tracking branch 'origin/apply-publish-on-success' into pcm5122-apply-switch 2026-10-26 07:26:00 -10:00
J. Nick Koston 46d8c3ec02 [core] Add publish="on_success" for Apply entities whose hub call can fail 2026-10-26 07:25:16 -10:00
J. Nick Koston fb88e6fc40 [pcm5122] Name the test helper for clang-tidy 2026-10-26 07:24:14 -10:00
6cb622417a [tas58xx] Add fault_output and modulation options (#21242)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
2026-10-26 17:18:18 +00:00
Jonathan Swoboda 960316abd6 [core] Percent-encode "/" in git credentials (#21653) 2026-10-26 07:17:44 -10:00
J. Nick Koston 4eafe90cab [pcm5122] Use Apply switches for the power switches 2026-10-26 07:15:45 -10:00
J. Nick Koston d5bd1d598a [pcm5122] Add tests for the power switches 2026-10-26 07:14:44 -10:00
Jonathan Swoboda 87341dc136 [logger] Enable Log V2 only on the native ESP-IDF toolchain (#21652) 2026-10-26 13:03:15 -04:00
30 changed files with 631 additions and 979 deletions

No files matched your search

+2 -1
View File
@@ -443,7 +443,8 @@ file does, and it is the authority when they disagree. The most useful starting
- **Hub forwarding entities need no C++ class:** a button, switch, number or select that only calls its hub
uses `button.ApplyButton` (`switch.ApplySwitch`, `number.ApplyNumber`, `select.ApplySelect`) in its schema
and `apply=` on the `sub_*` call. The body is a call on the hub with `entity` and `state`, `value` or
`index`/`option` in scope; on a switch, number or select `publish="before"` or `"after"` publishes the state.
`index`/`option` in scope; on a switch, number or select `publish="before"` or `"after"` publishes the state,
and `publish="on_success"` publishes only when the hub call returns true (a write the device can refuse).
`publish="momentary"` is only for legacy action switches (restart, factory reset): it publishes off and runs
the body only when turned on. Never use it for a new entity; an action is a button.
```python
@@ -373,7 +373,7 @@ void ESPHomeOTAComponent::handle_handshake_() {
// Value initialized: a corrupt stream that back references the
// window before it is filled then copies zeros, never stale memory.
// Default placement, PSRAM first where present: the session lives for one
// upload and keeps 6.0 KB of internal heap free while it runs
// upload and keeps 4.9 KB of internal heap free while it runs
this->inflate_ = RAMAllocator<InflateSession>().make_unique();
if (this->inflate_ != nullptr) {
this->handshake_buf_[1] |= SERVER_FEATURE_SUPPORTS_DEFLATE;
@@ -36,10 +36,7 @@
* Altered for ESPHome: this is the raw deflate decoder from uzlib's
* tinflate.c (v2.9.5) with the gzip/zlib header parsers, checksums,
* runtime table builder and in-memory (non ring window) output path
* removed, and the public names prefixed with ota_inflate. Symbols are
* decoded from a 32 bit bit buffer through 9 bit lookup tables, with a
* fast loop for when a whole symbol fits in both the input and the output,
* and the output is written straight into the ring window.
* removed, and the public names prefixed with ota_inflate.
*/
#include "ota_esphome_inflate.h"
@@ -52,6 +49,16 @@
#define TINF_DICT_ERROR OTA_INFLATE_DICT_ERROR
#define TINF_DATA struct OtaInflateState
#define TINF_TREE struct OtaInflateTree
#define TINF_ARRAY_SIZE(arr) (sizeof(arr) / sizeof(*(arr)))
/* every output byte also goes into the ring window */
#define TINF_PUT(d, c) \
{ \
*d->dest++ = c; \
d->dict_ring[d->dict_idx++] = c; \
if (d->dict_idx == d->dict_size) \
d->dict_idx = 0; \
}
/* --------------------------------------------------- *
* -- constant tables (upstream builds them at runtime) -- *
@@ -75,52 +82,34 @@ static const unsigned char CLCIDX[] = {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4,
* -- utility functions -- *
* ----------------------- */
enum {
LIT_FAST_BITS = OTA_INFLATE_LIT_FAST_BITS,
DIST_FAST_BITS = OTA_INFLATE_DIST_FAST_BITS,
/* a lookup table entry is (code length << SYM_BITS) | symbol; 0 marks a longer code */
SYM_BITS = 9,
SYM_MASK = (1 << SYM_BITS) - 1,
/* input bytes one pass of the fast loop may take: three refills of up to 4 bytes */
FAST_IN_MIN = 12,
};
/* given an array of code lengths, build a tree and its lookup table */
static void tinf_build_tree(TINF_TREE *t, const unsigned char *lengths, unsigned int num, unsigned int fast_bits) {
const unsigned int fast_size = 1u << fast_bits;
unsigned short offs[16], next[16];
unsigned int i, sum, code;
/* given an array of code lengths, build a tree */
static void tinf_build_tree(TINF_TREE *t, const unsigned char *lengths, unsigned int num) {
unsigned short offs[16];
unsigned int i, sum;
/* clear code length count table */
for (i = 0; i < 16; ++i)
t->table[i] = 0;
/* scan symbol lengths, and sum code length counts */
for (i = 0; i < num; ++i)
t->table[lengths[i]]++;
/* In the lengths array, 0 means unused code. So, t->table[0] now contains
number of unused codes. But table's purpose is to contain # of codes of
particular length, and there're 0 codes of length 0. */
t->table[0] = 0;
for (sum = 0, code = 0, i = 0; i < 16; ++i) {
/* compute offset table for distribution sort */
for (sum = 0, i = 0; i < 16; ++i) {
offs[i] = sum;
sum += t->table[i];
if (i > 0)
code = (code + t->table[i - 1]) << 1;
next[i] = code;
}
for (i = 0; i < fast_size; ++i)
t->fast[i] = 0;
/* create code->symbol translation table (symbols sorted by code) */
for (i = 0; i < num; ++i) {
unsigned int len = lengths[i];
if (!len)
continue;
t->trans[offs[len]++] = i;
if (len <= fast_bits) {
/* codes arrive MSB first, the bit buffer is LSB first */
unsigned int c = next[len]++, rev = 0, j;
for (j = 0; j < len; ++j, c >>= 1)
rev = (rev << 1) | (c & 1);
for (j = rev; j < fast_size; j += 1u << len)
t->fast[j] = (unsigned short) ((len << SYM_BITS) | i);
}
if (lengths[i])
t->trans[offs[lengths[i]]++] = i;
}
}
@@ -128,78 +117,89 @@ static void tinf_build_tree(TINF_TREE *t, const unsigned char *lengths, unsigned
* -- decode functions -- *
* ---------------------- */
/* top the bit buffer up from the input buffer, without blocking for more */
static inline void tinf_refill(TINF_DATA *d) {
while (d->bitcount <= 24 && d->source < d->source_limit) {
d->tag |= (unsigned int) *d->source++ << d->bitcount;
d->bitcount += 8;
static unsigned char uzlib_get_byte(TINF_DATA *d) {
/* If end of source buffer is not reached, return next byte from source
buffer. */
if (d->source < d->source_limit) {
return *d->source++;
}
/* Otherwise if there's callback and we haven't seen EOF yet, try to
read next byte using it. (Note: the callback can also update ->source
and ->source_limit). */
if (!d->eof) {
int val = d->source_read_cb(d);
if (val >= 0) {
return (unsigned char) val;
}
}
/* Otherwise, we hit EOF (either from ->source_read_cb() or from exhaustion
of the buffer), and it will be "sticky", i.e. further calls to this
function will end up here too. */
d->eof = true;
return 0;
}
/* make at least num (<= 16) bits available; past the end of input reads zeros and sets eof */
static inline void tinf_need(TINF_DATA *d, unsigned int num) {
while (d->bitcount < num) {
int val = -1;
if (d->source < d->source_limit) {
val = *d->source++;
} else if (!d->eof) {
val = d->source_read_cb(d);
}
if (val < 0) {
d->eof = true;
val = 0;
}
d->tag |= (unsigned int) val << d->bitcount;
d->bitcount += 8;
}
}
/* get one bit from source stream */
static int tinf_getbit(TINF_DATA *d) {
unsigned int bit;
static inline unsigned int tinf_take(TINF_DATA *d, unsigned int num) {
unsigned int val = d->tag & ((1u << num) - 1);
d->tag >>= num;
d->bitcount -= num;
return val;
/* check if tag is empty */
if (!d->bitcount--) {
/* load next tag */
d->tag = uzlib_get_byte(d);
d->bitcount = 7;
}
/* shift bit out of tag */
bit = d->tag & 0x01;
d->tag >>= 1;
return bit;
}
/* read a num bit value from a stream and add base */
static inline unsigned int tinf_read_bits(TINF_DATA *d, unsigned int num, unsigned int base) {
tinf_need(d, num);
return tinf_take(d, num) + base;
}
static unsigned int tinf_read_bits(TINF_DATA *d, int num, int base) {
unsigned int val = 0;
/* canonical decode of the code at the bottom of tag; len gets the code length.
The trans index stays below the tree's symbol count, which trans always holds */
static int tinf_decode_long(const TINF_TREE *t, unsigned int tag, unsigned int *len) {
unsigned int code = 0, first = 0, index = 0, l;
for (l = 1; l < 16; ++l, tag >>= 1) {
unsigned int count = t->table[l];
code |= tag & 1;
if (code - first < count) {
*len = l;
return t->trans[index + code - first];
}
index += count;
first = (first + count) << 1;
code <<= 1;
/* read num bits */
if (num) {
unsigned int limit = 1 << (num);
unsigned int mask;
for (mask = 1; mask < limit; mask *= 2)
if (tinf_getbit(d))
val += mask;
}
return TINF_DATA_ERROR;
return val + base;
}
/* decode a symbol, reading more input only while the code is not all in the bit
buffer; bits above bitcount are zero, so a code no longer than bitcount is real */
static int tinf_decode_symbol(TINF_DATA *d, const TINF_TREE *t) {
tinf_refill(d);
for (;;) {
unsigned int len;
int sym = tinf_decode_long(t, d->tag, &len);
if (sym >= 0 && len <= d->bitcount) {
tinf_take(d, len);
return sym;
}
if (d->bitcount >= 15)
/* given a data stream and a tree, decode a symbol */
static int tinf_decode_symbol(TINF_DATA *d, TINF_TREE *t) {
int sum = 0, cur = 0, len = 0;
/* get more bits while code value is above sum */
do {
cur = 2 * cur + tinf_getbit(d);
if (++len == TINF_ARRAY_SIZE(t->table)) {
return TINF_DATA_ERROR;
tinf_need(d, d->bitcount + 1);
}
sum += t->table[len];
cur -= t->table[len];
} while (cur >= 0);
sum += cur;
if (sum < 0 || sum >= t->size) {
return TINF_DATA_ERROR;
}
return t->trans[sum];
}
/* given a data stream, decode dynamic trees from it */
@@ -230,7 +230,7 @@ static int tinf_decode_trees(TINF_DATA *d, TINF_TREE *lt, TINF_TREE *dt) {
}
/* build code length tree, temporarily use length tree */
tinf_build_tree(lt, lengths, 19, LIT_FAST_BITS);
tinf_build_tree(lt, lengths, 19);
/* decode code lengths for the dynamic trees */
hlimit = hlit + hdist;
@@ -282,8 +282,8 @@ static int tinf_decode_trees(TINF_DATA *d, TINF_TREE *lt, TINF_TREE *dt) {
}
/* build dynamic trees */
tinf_build_tree(lt, lengths, hlit, LIT_FAST_BITS);
tinf_build_tree(dt, lengths + hlit, hdist, DIST_FAST_BITS);
tinf_build_tree(lt, lengths, hlit);
tinf_build_tree(dt, lengths + hlit, hdist);
return TINF_OK;
}
@@ -302,189 +302,84 @@ static void tinf_build_fixed_trees(TINF_TREE *lt, TINF_TREE *dt) {
lengths[i] = 7;
for (; i < 288; ++i)
lengths[i] = 8;
tinf_build_tree(lt, lengths, 288, LIT_FAST_BITS);
tinf_build_tree(lt, lengths, 288);
for (i = 0; i < 32; ++i)
lengths[i] = 5;
tinf_build_tree(dt, lengths, 32, DIST_FAST_BITS);
}
/* inflate with the bit buffer and both cursors in locals while the input holds a
whole symbol; a match that runs past the end of the ring is left in curlen */
static int tinf_inflate_fast(TINF_DATA *d, const TINF_TREE *lt, const TINF_TREE *dt) {
const unsigned char *src = d->source;
const unsigned char *const src_end = d->source_limit;
unsigned char *const ring = d->dict_ring;
unsigned char *const ring_end = ring + d->dict_size;
unsigned char *out = d->dest;
const uint16_t *const lfast = lt->fast;
const uint16_t *const dfast = dt->fast;
unsigned int tag = d->tag, bits = d->bitcount;
int res = TINF_OK;
#define REFILL() \
while (bits <= 24) { \
tag |= (unsigned int) *src++ << bits; \
bits += 8; \
}
#define DROP(n) (tag >>= (n), bits -= (n))
while (src_end - src >= FAST_IN_MIN && out < ring_end) {
unsigned int e, len;
int sym;
REFILL();
e = lfast[tag & ((1u << LIT_FAST_BITS) - 1)];
if (e) {
len = e >> SYM_BITS;
sym = e & SYM_MASK;
} else {
sym = tinf_decode_long(lt, tag, &len);
if (sym < 0) {
res = sym;
break;
}
}
DROP(len);
if (sym < 256) {
*out++ = sym;
continue;
}
if (sym == 256) {
res = TINF_DONE;
break;
}
sym -= 257;
if (sym >= 29) {
res = TINF_DATA_ERROR;
break;
}
/* the lit/len code and its extra bits fit the refilled buffer together */
unsigned int length = LENGTH_BASE[sym] + (tag & ((1u << LENGTH_BITS[sym]) - 1));
DROP(LENGTH_BITS[sym]);
REFILL();
e = dfast[tag & ((1u << DIST_FAST_BITS) - 1)];
if (e) {
len = e >> SYM_BITS;
sym = e & SYM_MASK;
} else {
sym = tinf_decode_long(dt, tag, &len);
}
if (sym < 0 || sym >= 30) {
res = TINF_DATA_ERROR;
break;
}
DROP(len);
REFILL();
unsigned int offs = DIST_BASE[sym] + (tag & ((1u << DIST_BITS[sym]) - 1));
DROP(DIST_BITS[sym]);
if (offs > d->dict_size) {
res = TINF_DICT_ERROR;
break;
}
/* wrap as an index: a pointer before the ring would be undefined */
unsigned int at = out - ring;
const unsigned char *from = ring + (at >= offs ? at - offs : at + d->dict_size - offs);
unsigned int n = ring_end - out;
if (n > length)
n = length;
length -= n;
/* at most two runs: up to the end of the ring, then on from its start */
while (n) {
unsigned int run = ring_end - from;
if (run > n)
run = n;
n -= run;
do {
*out++ = *from++;
} while (--run);
if (from == ring_end)
from = ring;
}
if (length) {
d->curlen = length;
d->lz_off = from - ring;
}
}
#undef REFILL
#undef DROP
d->source = src;
d->dest = out;
d->tag = tag;
d->bitcount = bits;
return res;
tinf_build_tree(dt, lengths, 32);
}
/* ----------------------------- *
* -- block inflate functions -- *
* ----------------------------- */
/* given a stream and two trees, inflate until the ring is full or the block ends */
/* given a stream and two trees, inflate next chunk of output (a byte or more) */
static int tinf_inflate_block_data(TINF_DATA *d, TINF_TREE *lt, TINF_TREE *dt) {
unsigned char *const ring_end = d->dict_ring + d->dict_size;
while (d->dest < ring_end) {
if (d->curlen != 0) {
unsigned int n = ring_end - d->dest;
if (n > d->curlen)
n = d->curlen;
d->curlen -= n;
do {
*d->dest++ = d->dict_ring[d->lz_off];
if ((unsigned) ++d->lz_off == d->dict_size)
d->lz_off = 0;
} while (--n);
continue;
}
if (d->source_limit - d->source >= FAST_IN_MIN) {
int res = tinf_inflate_fast(d, lt, dt);
if (res != TINF_OK)
return res;
continue;
}
if (d->curlen == 0) {
unsigned int offs;
int dist;
int sym = tinf_decode_symbol(d, lt);
if (d->eof)
if (d->eof) {
return TINF_DATA_ERROR;
if (sym < 0)
}
if (sym < 0) {
return sym;
}
/* literal byte */
if (sym < 256) {
*d->dest++ = sym;
continue;
TINF_PUT(d, sym);
return TINF_OK;
}
/* end of block */
if (sym == 256)
if (sym == 256) {
return TINF_DONE;
}
/* substring from sliding dictionary */
sym -= 257;
if (sym >= 29)
if (sym >= 29) {
return TINF_DATA_ERROR;
}
/* possibly get more bits from length code */
d->curlen = tinf_read_bits(d, LENGTH_BITS[sym], LENGTH_BASE[sym]);
dist = tinf_decode_symbol(d, dt);
if (dist < 0 || dist >= 30)
if (dist < 0 || dist >= 30) {
return TINF_DATA_ERROR;
}
/* possibly get more bits from distance code */
offs = tinf_read_bits(d, DIST_BITS[dist], DIST_BASE[dist]);
if (offs > d->dict_size)
return TINF_DICT_ERROR;
d->lz_off = (int) (d->dest - d->dict_ring) - (int) offs;
if (d->lz_off < 0)
/* calculate and validate actual LZ offset to use */
if (offs > d->dict_size) {
return TINF_DICT_ERROR;
}
/* Note: we don't try to catch offset which points to not yet filled
part of the dictionary here. Doing so would require keeping another
variable to track "filled in" size of the dictionary. Appearance of
such an offset cannot lead to accessing memory outside of the
dictionary buffer, and clients which don't want to leak unrelated
information, should explicitly initialize dictionary buffer passed
to uzlib. */
d->lz_off = d->dict_idx - offs;
if (d->lz_off < 0) {
d->lz_off += d->dict_size;
}
}
/* copy next byte from dict substring */
TINF_PUT(d, d->dict_ring[d->lz_off]);
if ((unsigned) ++d->lz_off == d->dict_size) {
d->lz_off = 0;
}
d->curlen--;
return TINF_OK;
}
@@ -493,22 +388,30 @@ static int tinf_inflate_uncompressed_block(TINF_DATA *d) {
if (d->curlen == 0) {
unsigned int length, invlength;
/* the block starts on a byte boundary */
tinf_take(d, d->bitcount & 7);
length = tinf_read_bits(d, 16, 0);
invlength = tinf_read_bits(d, 16, 0);
/* get length */
length = uzlib_get_byte(d);
length += 256 * uzlib_get_byte(d);
/* get one's complement of length */
invlength = uzlib_get_byte(d);
invlength += 256 * uzlib_get_byte(d);
/* check length */
if (length != (~invlength & 0x0000ffff))
return TINF_DATA_ERROR;
/* increment length to properly return TINF_DONE below, without
producing data at the same time */
d->curlen = length + 1;
/* make sure we start next block on a byte boundary */
d->bitcount = 0;
}
if (--d->curlen == 0)
if (--d->curlen == 0) {
return TINF_DONE;
}
/* read first: a read that needs input may flush the output up to dest */
unsigned char c = tinf_read_bits(d, 8, 0);
*d->dest++ = c;
unsigned char c = uzlib_get_byte(d);
TINF_PUT(d, c);
return TINF_OK;
}
@@ -516,10 +419,10 @@ static int tinf_inflate_uncompressed_block(TINF_DATA *d) {
* -- public functions -- *
* ---------------------- */
/* initialize decompression structure */
void ota_inflate_init(TINF_DATA *d, unsigned char *dict, unsigned int dict_len) {
d->source = NULL;
d->source_limit = NULL;
d->dest = dict;
d->tag = 0;
d->eof = 0;
d->bitcount = 0;
@@ -528,56 +431,68 @@ void ota_inflate_init(TINF_DATA *d, unsigned char *dict, unsigned int dict_len)
d->btype = -1;
d->dict_size = dict_len;
d->dict_ring = dict;
d->dict_idx = 0;
d->curlen = 0;
d->ltree.trans = d->ltrans;
d->ltree.fast = d->lfast;
d->ltree.size = TINF_ARRAY_SIZE(d->ltrans);
d->dtree.trans = d->dtrans;
d->dtree.fast = d->dfast;
d->dtree.size = TINF_ARRAY_SIZE(d->dtrans);
}
/* inflate next output bytes from compressed stream */
int ota_inflate(TINF_DATA *d) {
/* the caller has taken the previous ringful */
if (d->dest == d->dict_ring + d->dict_size)
d->dest = d->dict_ring;
do {
int res;
/* start a new block */
if (d->btype == -1) {
int old_btype;
next_blk:
old_btype = d->btype;
d->bfinal = tinf_read_bits(d, 1, 0);
/* read final block flag */
d->bfinal = tinf_getbit(d);
/* read block type (2 bits) */
d->btype = tinf_read_bits(d, 2, 0);
if (d->btype == 1 && old_btype != 1) {
/* build fixed huffman trees */
tinf_build_fixed_trees(&d->ltree, &d->dtree);
} else if (d->btype == 2) {
/* decode trees from stream */
res = tinf_decode_trees(d, &d->ltree, &d->dtree);
if (res != TINF_OK)
if (res != TINF_OK) {
return res;
}
}
}
/* process current block */
switch (d->btype) {
case 0:
/* decompress uncompressed block */
res = tinf_inflate_uncompressed_block(d);
break;
case 1:
case 2:
/* decompress block with fixed/dynamic huffman trees */
/* trees were decoded previously, so it's the same routine for both */
res = tinf_inflate_block_data(d, &d->ltree, &d->dtree);
break;
default:
return TINF_DATA_ERROR;
}
if (res == TINF_DONE && !d->bfinal)
if (res == TINF_DONE && !d->bfinal) {
/* the block has ended (without producing more data), but we
can't return without data, so start procesing next block */
goto next_blk;
}
if (res != TINF_OK)
if (res != TINF_OK) {
return res;
}
} while (d->dest < d->dict_ring + d->dict_size);
} while (d->dest < d->dest_limit);
return TINF_OK;
}
@@ -16,14 +16,10 @@ enum OtaInflateResult {
OTA_INFLATE_DICT_ERROR = -5,
};
/* Code bits each lookup table resolves; longer codes take the canonical decode.
The distance alphabet has 30 symbols, so its table is kept small */
enum { OTA_INFLATE_LIT_FAST_BITS = 9, OTA_INFLATE_DIST_FAST_BITS = 6 };
struct OtaInflateTree {
uint16_t table[16]; /* table of code length counts */
uint16_t *fast; /* (len << 9) | symbol by the next input bits, 0 = longer code */
uint16_t *trans; /* code -> symbol translation table */
uint16_t *trans; /* code -> symbol translation table, size entries */
uint16_t size;
};
struct OtaInflateState {
@@ -33,8 +29,9 @@ struct OtaInflateState {
/* Called when source is exhausted; returns the next byte or -1 at EOF.
It may refill source/source_limit for buffered operation. */
int (*source_read_cb)(struct OtaInflateState *d);
/* Output cursor in dict_ring: each call fills the ring from here */
/* Output cursor and one past the end of the output buffer */
unsigned char *dest;
unsigned char *dest_limit;
/* Ring window holding the last dict_size output bytes for back references */
unsigned char *dict_ring;
@@ -42,8 +39,9 @@ struct OtaInflateState {
unsigned int curlen;
int lz_off;
unsigned int dict_size;
unsigned int dict_idx;
/* btype is -1 between blocks; bitcount is the number of valid bits in tag (<= 32) */
/* One word: btype is -1 between blocks, bitcount never exceeds 7 */
int8_t btype;
uint8_t bfinal;
uint8_t bitcount;
@@ -53,15 +51,13 @@ struct OtaInflateState {
struct OtaInflateTree dtree; /* dynamic distance tree */
uint16_t ltrans[288];
uint16_t dtrans[32]; /* the distance alphabet has 30 symbols, so the tree is kept small */
uint16_t lfast[1 << OTA_INFLATE_LIT_FAST_BITS];
uint16_t dfast[1 << OTA_INFLATE_DIST_FAST_BITS];
};
/* dict must cover the encoder's window (its largest back reference) */
void ota_inflate_init(struct OtaInflateState *d, unsigned char *dict, unsigned int dict_len);
/* Inflates into dict until it is full (OK) or the stream ends (DONE); the output
is dict up to dest. The next call after OK starts dict over, so take its
contents first */
/* Fills dest up to dest_limit (OK) or to the end of the stream (DONE). dest may
alias dict only if dest_limit - dest == dict_len and dest is reset to dict
exactly when a call returns OK, so the ring index and dest stay in lockstep */
int ota_inflate(struct OtaInflateState *d);
#ifdef __cplusplus
@@ -65,15 +65,16 @@ ota::OTAResponseTypes ESPHomeOTAComponent::inflate_data_(uint8_t *in, size_t ima
};
int res;
session.flushed = 0;
do {
// The ring index wrapped to 0 exactly when the window filled
session.dest = session.window;
session.dest_limit = session.window + OTA_INFLATE_WINDOW_SIZE;
session.flushed = 0;
res = ota_inflate(&session);
// A stored block keeps emitting zeros after a failed read, hence eof
if (res < 0 || session.eof)
break;
session.error = this->inflate_flush_(session);
// A full window is all in flash; the next call starts it over
session.flushed = 0;
} while (res != OTA_INFLATE_DONE && session.error == ota::OTA_RESPONSE_OK);
// Transport and flash failures are logged where they happen
+4 -3
View File
@@ -607,9 +607,10 @@ async def _late_logger_init(config: ConfigType) -> None:
# esp_rom_printf instead of pulling ~1.2KB esp_rom_vprintf into IRAM.
# S2/C2 have a ROM vprintf, so IDF forces CONSTRAINED_ENV_SAFE=1 and
# cache-off DRAM logs would reach the flash-resident wrapper; keep V1.
if idf_version() >= cv.Version(6, 1, 0) and get_esp32_variant() not in (
VARIANT_ESP32C2,
VARIANT_ESP32S2,
if (
CORE.using_toolchain_esp_idf
and idf_version() >= cv.Version(6, 1, 0)
and get_esp32_variant() not in (VARIANT_ESP32C2, VARIANT_ESP32S2)
):
add_idf_sdkconfig_option("CONFIG_LOG_VERSION_1", False)
add_idf_sdkconfig_option("CONFIG_LOG_VERSION_2", True)
+10 -14
View File
@@ -4,29 +4,25 @@ import esphome.config_validation as cv
from esphome.const import CONF_POWER_MODE, ENTITY_CATEGORY_CONFIG
from esphome.types import ConfigType
from ..audio_dac import CONF_PCM5122, PCM5122, pcm5122_ns
PCM5122PowerSwitch = pcm5122_ns.class_("PCM5122PowerSwitch", switch.Switch)
pcm5122_power_switch_mode = pcm5122_ns.enum("PCM5122PowerSwitchMode")
PCM5122_POWER_SWITCH_MODE_ENUM = pcm5122_power_switch_mode.options(
"standby", "powerdown", prefix="PCM5122_POWER_SWITCH_MODE_"
)
from ..audio_dac import CONF_PCM5122, PCM5122
CONFIG_SCHEMA = switch.switch_schema(
PCM5122PowerSwitch,
switch.ApplySwitch,
entity_category=ENTITY_CATEGORY_CONFIG,
).extend(
{
cv.GenerateID(CONF_PCM5122): cv.use_id(PCM5122),
cv.Optional(CONF_POWER_MODE, default="powerdown"): cv.enum(
PCM5122_POWER_SWITCH_MODE_ENUM, lower=True
cv.Optional(CONF_POWER_MODE, default="powerdown"): cv.one_of(
"standby", "powerdown", lower=True
),
}
)
async def to_code(config: ConfigType) -> None:
var = await switch.new_switch(config)
await cg.register_parented(var, config[CONF_PCM5122])
cg.add(var.set_power_mode(config[CONF_POWER_MODE]))
hub = await cg.get_variable(config[CONF_PCM5122])
setter = "set_standby" if config[CONF_POWER_MODE] == "standby" else "set_powerdown"
# The switch shows the new state only once the DAC accepted it
await switch.sub_switches(config, parent=hub).create(
config, None, apply=f"{setter}(state)", publish="on_success"
)
@@ -1,12 +0,0 @@
#include "power_switch.h"
namespace esphome::pcm5122 {
void PCM5122PowerSwitch::write_state(bool state) {
bool ok = (this->mode_ == PCM5122_POWER_SWITCH_MODE_STANDBY) ? this->parent_->set_standby(state)
: this->parent_->set_powerdown(state);
if (ok)
this->publish_state(state);
}
} // namespace esphome::pcm5122
@@ -1,24 +0,0 @@
#pragma once
#include "esphome/components/switch/switch.h"
#include "../pcm5122.h"
namespace esphome::pcm5122 {
enum PCM5122PowerSwitchMode : uint8_t {
PCM5122_POWER_SWITCH_MODE_STANDBY,
PCM5122_POWER_SWITCH_MODE_POWERDOWN,
};
class PCM5122PowerSwitch final : public switch_::Switch, public Parented<PCM5122> {
public:
void set_power_mode(PCM5122PowerSwitchMode mode) { this->mode_ = mode; }
protected:
void write_state(bool state) override;
PCM5122PowerSwitchMode mode_{PCM5122_POWER_SWITCH_MODE_POWERDOWN};
};
} // namespace esphome::pcm5122
+23
View File
@@ -6,6 +6,7 @@ from esphome.automation import maybe_simple_id
import esphome.codegen as cg
from esphome.components import i2c
from esphome.components.audio_dac import AudioDac
from esphome.components.const import CONF_MODULATION
import esphome.config_validation as cv
from esphome.const import CONF_ENABLE_PIN, CONF_ID, CONF_MODEL
from esphome.cpp_generator import MockObj
@@ -19,6 +20,7 @@ DEPENDENCIES = ["i2c"]
CONF_ANALOG_GAIN = "analog_gain"
CONF_DAC_MODE = "dac_mode"
CONF_FAULT_OUTPUT = "fault_output"
CONF_IGNORE_ENABLE_PIN_WARNING = "ignore_enable_pin_warning"
CONF_MIXER_MODE = "mixer_mode"
CONF_VOLUME_MIN_DB = "volume_min_db"
@@ -39,6 +41,11 @@ MIXER_MODES = MixerMode.options(
"stereo", "stereo_inverse", "mono", "left", "right", prefix="MIXER_MODE_"
)
Modulation = tas58xx_ns.enum("Modulation")
MODULATIONS = Modulation.options("bd_mode", "1spw_mode", prefix="MODULATION_")
FAULT_OUTPUT_NONE = "none"
@dataclass(frozen=True)
class Model:
@@ -49,6 +56,9 @@ class Model:
volume_min_db: float
volume_max_db: float
default_address: int
# Pins that can report FAULTZ: name -> pin number n, selected at 0x61 + n (ModelInfo::fault_output_pins)
fault_outputs: dict[str, int]
default_fault_output: str
MODELS: dict[str, Model] = {
@@ -58,6 +68,8 @@ MODELS: dict[str, Model] = {
volume_min_db=-103.0,
volume_max_db=24.0,
default_address=0x2D,
fault_outputs={"adr": 0},
default_fault_output="adr",
),
DAC_TAS5825M: Model(
model_info=tas58xx_ns.TAS5825M_MODEL,
@@ -65,6 +77,8 @@ MODELS: dict[str, Model] = {
volume_min_db=-103.0,
volume_max_db=24.0,
default_address=0x4C,
fault_outputs={"gpio0": 0, "gpio1": 1, "gpio2": 2},
default_fault_output="gpio1",
),
}
@@ -100,9 +114,15 @@ def _model_schema(model: Model) -> cv.Schema:
cv.Optional(CONF_DAC_MODE, default="btl"): cv.enum(
DAC_MODES, lower=True
),
cv.Optional(
CONF_FAULT_OUTPUT, default=model.default_fault_output
): cv.one_of(FAULT_OUTPUT_NONE, *model.fault_outputs, lower=True),
cv.Optional(CONF_MIXER_MODE, default="stereo"): cv.enum(
MIXER_MODES, lower=True
),
cv.Optional(CONF_MODULATION, default="bd_mode"): cv.enum(
MODULATIONS, lower=True
),
cv.Optional(
CONF_VOLUME_MIN_DB, default=model.volume_min_db
): volume_validator,
@@ -172,7 +192,10 @@ async def to_code(config: ConfigType) -> None:
cg.add(var.set_analog_gain(config[CONF_ANALOG_GAIN]))
cg.add(var.set_dac_mode(config[CONF_DAC_MODE]))
if (fault_output := config[CONF_FAULT_OUTPUT]) != FAULT_OUTPUT_NONE:
cg.add(var.set_fault_output(model.fault_outputs[fault_output]))
cg.add(var.set_mixer_mode(config[CONF_MIXER_MODE]))
cg.add(var.set_modulation(config[CONF_MODULATION]))
cg.add(var.set_volume_min_db(config[CONF_VOLUME_MIN_DB]))
cg.add(var.set_volume_max_db(config[CONF_VOLUME_MAX_DB]))
await cg.add_pin(var.set_enable_pin, config.get(CONF_ENABLE_PIN))
@@ -8,11 +8,8 @@ namespace esphome::tas58xx {
// Registers 0x46, 0x7D, 0x7E and page 1 register 0x51 are not documented in the datasheet.
static constexpr i2c::I2CRegValue STARTUP_SEQUENCE[] PROGMEM = {
{0x03, 0x00}, // DEVICE_CTRL_2: deep sleep
{0x46, 0x01},
{0x46, 0x01}, // PPC 96 kHz process flow value (its 48 kHz FIR flows write 0x11)
{0x03, 0x02}, // DEVICE_CTRL_2: Hi-Z
// The I2C address is latched at power up, after which the ADR pin can report faults
{0x61, 0x0B}, // ADR_PIN_CONFIG: FAULTZ
{0x60, 0x01}, // ADR_PIN_CTRL: output
{0x7D, 0x11},
{0x7E, 0xFF},
{0x00, 0x01}, // Page 1
@@ -25,6 +22,8 @@ static constexpr i2c::I2CRegValue STARTUP_SEQUENCE[] PROGMEM = {
static const LogString *model_name() { return LOG_STR("TAS5805M"); }
static const LogString *fault_output_name(uint8_t) { return LOG_STR("ADR"); }
// An if chain rather than a switch: a switch table would land in rodata, which is RAM on ESP8266.
static const LogString *fault_name(uint8_t index) {
if (index == 0)
@@ -88,6 +87,8 @@ const ModelInfo TAS5805M_MODEL = {
NO_BIT, // FAULT_SENSOR_RIGHT_CHANNEL_CBC_OVER_CURRENT_WARNING
NO_BIT, // FAULT_SENSOR_OVER_TEMP_146C_WARNING
},
.fault_output_pins = 1, // ADR
.fault_output_name = fault_output_name,
};
} // namespace esphome::tas58xx
+12 -5
View File
@@ -6,7 +6,7 @@ namespace esphome::tas58xx {
// Remainder of the startup sequence, run after the reset in TAS58xx::init_(). Register 0x00 selects the page.
// Based on the TI PurePath Console (PPC) export for "TAS5825M 2-Band DRC&AGL 2.0 96k".
// Registers 0x46, 0x7D, 0x7E, page 1 register 0x51 and page 2 registers 0x1D, 0x19 are not documented in datasheet.
// Registers 0x7D, 0x7E, page 1 register 0x51 and page 2 registers 0x1D, 0x19 are not documented in datasheet.
static constexpr i2c::I2CRegValue STARTUP_SEQUENCE[] PROGMEM = {
{0x03, 0x00}, // DEVICE_CTRL_2: deep sleep, the state the PPC sequence starts from
{0x7D, 0x11},
@@ -17,20 +17,25 @@ static constexpr i2c::I2CRegValue STARTUP_SEQUENCE[] PROGMEM = {
{0x1D, 0x00},
{0x19, 0x80},
{0x00, 0x00}, // Page 0
{0x46, 0x11},
{0x46, 0x11}, // DSP_CTRL: 96 kHz processing (bits 4-3 = 10), use default coefficients (bit 0 = 1)
// PPC also writes 0x02 (DEVICE_CTRL_1) and 0x54 (AGAIN) here; init_() writes both from YAML
{0x53, 0x01}, // ANA_CTRL: in phase, 100kHz bandwidth for high audio performance with Fsw=384kHz
{0x03, 0x02}, // DEVICE_CTRL_2: Hi-Z
// Additional register configuration
// GPIO1 is a dedicated pin on TAS5825M (separate from ADR), used as FAULTZ
{0x62, 0x0B}, // GPIO1_SEL: GPIO1 as FAULTZ
{0x60, 0x02}, // GPIO_CTRL: GPIO1 is output
{0x77, 0x07}, // CBC_CONTROL: enable cycle-by-cycle current limit for warnings and faults
};
static const LogString *model_name() { return LOG_STR("TAS5825M"); }
static const LogString *fault_output_name(uint8_t pin) {
if (pin == 0)
return LOG_STR("GPIO0");
if (pin == 1)
return LOG_STR("GPIO1");
return LOG_STR("GPIO2");
}
// An if chain rather than a switch: a switch table would land in rodata, which is RAM on ESP8266.
static const LogString *fault_name(uint8_t index) {
if (index == 0)
@@ -113,6 +118,8 @@ const ModelInfo TAS5825M_MODEL = {
// 25, // FAULT_SENSOR_OVER_TEMP_122C_WARNING // not currently included
// 24, // FAULT_SENSOR_OVER_TEMP_112C_WARNING // not currently included
},
.fault_output_pins = 3, // GPIO0, GPIO1, GPIO2 (ADR is an analog input only on TAS5825M)
.fault_output_name = fault_output_name,
};
} // namespace esphome::tas58xx
+35 -6
View File
@@ -20,6 +20,7 @@ static constexpr uint8_t TAS58XX_RESET_CTRL = 0x01;
static constexpr uint8_t TAS58XX_RESET_CTRL_ALL = 0x11; // Reset DSP/control port and registers
static constexpr uint8_t TAS58XX_DEVICE_CTRL_1 = 0x02;
static constexpr uint8_t TAS58XX_DEVICE_CTRL_1_PBTL = (1 << 2);
static constexpr uint8_t TAS58XX_DEVICE_CTRL_1_1SPW = 0x01; // DAMP_MOD = 01
static constexpr uint8_t TAS58XX_DEVICE_CTRL_2 = 0x03;
static constexpr uint8_t TAS58XX_DEVICE_CTRL_2_MUTE = (1 << 3);
static constexpr uint8_t TAS58XX_CTRL_STATE_MASK = 0x03; // DEVICE_CTRL_2 and POWER_STATE
@@ -33,6 +34,9 @@ static constexpr uint8_t TAS58XX_DIG_VOL_0DB = 0x30;
static constexpr uint8_t TAS58XX_DIG_VOL_MINUS_103DB = 0xFE;
static constexpr uint8_t TAS58XX_AGAIN = 0x54; // 0x00 = 0 dB to 0x1F = -15.5 dB in 0.5 dB steps
static constexpr uint8_t TAS58XX_AGAIN_MINUS_15_5DB = 0x1F;
static constexpr uint8_t TAS58XX_GPIO_CTRL = 0x60; // ADR_PIN_CTRL on TAS5805M: output enable, bit n for pin n
static constexpr uint8_t TAS58XX_GPIO0_SEL = 0x61; // ADR_PIN_CONFIG on TAS5805M: pin n is selected at 0x61 + n
static constexpr uint8_t TAS58XX_GPIO_SEL_FAULTZ = 0x0B; // pin function: FAULTZ output
static constexpr uint8_t TAS58XX_POWER_STATE = 0x68;
static constexpr uint8_t TAS58XX_CHAN_FAULT = 0x70; // GLOBAL_FAULT1, GLOBAL_FAULT2 and OT_WARNING follow
static constexpr uint8_t TAS58XX_FAULT_REGISTER_COUNT = 4;
@@ -98,12 +102,26 @@ bool TAS58xx::init_() {
return false;
}
// Setters are public, so keep the value inside the register range
// The I2C address is latched at power up, so ADR can now be an output. The pin function is written before the
// output enable, so the pin never drives another function.
if (this->fault_output_pin_ != FAULT_OUTPUT_NONE) {
// The setter is public, so only write this model's pins; YAML only allows the pins of the model
if (this->fault_output_pin_ >= this->model_->fault_output_pins) {
ESP_LOGW(TAG, "Invalid fault output index %u", this->fault_output_pin_);
} else if (!this->write_byte(TAS58XX_GPIO0_SEL + this->fault_output_pin_, TAS58XX_GPIO_SEL_FAULTZ) ||
!this->write_byte(TAS58XX_GPIO_CTRL, static_cast<uint8_t>(1 << this->fault_output_pin_))) {
ESP_LOGE(TAG, "I2C write failed during init");
return false;
}
}
// Setters are public, so keep the values inside the register ranges
const uint8_t again =
static_cast<uint8_t>(lroundf(clamp(-this->analog_gain_db_ * 2.0f, 0.0f, float{TAS58XX_AGAIN_MINUS_15_5DB})));
if (!this->write_byte(TAS58XX_DEVICE_CTRL_1, this->dac_mode_ == DAC_MODE_PBTL ? TAS58XX_DEVICE_CTRL_1_PBTL : 0) ||
!this->write_byte(TAS58XX_AGAIN, again) || !this->write_volume_() ||
!this->write_ctrl_state_(TAS58XX_CTRL_STATE_PLAY, this->is_muted_) ||
const uint8_t device_ctrl_1 = (this->dac_mode_ == DAC_MODE_PBTL ? TAS58XX_DEVICE_CTRL_1_PBTL : 0) |
(this->modulation_ == MODULATION_1SPW_MODE ? TAS58XX_DEVICE_CTRL_1_1SPW : 0);
if (!this->write_byte(TAS58XX_DEVICE_CTRL_1, device_ctrl_1) || !this->write_byte(TAS58XX_AGAIN, again) ||
!this->write_volume_() || !this->write_ctrl_state_(TAS58XX_CTRL_STATE_PLAY, this->is_muted_) ||
!this->write_byte(TAS58XX_FAULT_CLEAR, TAS58XX_FAULT_CLEAR_ANALOG)) {
ESP_LOGE(TAG, "I2C write failed during init");
return false;
@@ -263,6 +281,14 @@ void TAS58xx::dump_config() {
} else {
mixer_mode = LOG_STR("Stereo");
}
const LogString *fault_output;
if (this->fault_output_pin_ == FAULT_OUTPUT_NONE) {
fault_output = LOG_STR("None");
} else if (this->fault_output_pin_ >= this->model_->fault_output_pins) {
fault_output = LOG_STR("Invalid");
} else {
fault_output = this->model_->fault_output_name(this->fault_output_pin_);
}
ESP_LOGCONFIG(TAG,
"Audio Amplifier:\n"
" Model: %s",
@@ -273,11 +299,14 @@ void TAS58xx::dump_config() {
ESP_LOGCONFIG(TAG,
" Analog Gain: %.1f dB\n"
" DAC Mode: %s\n"
" Modulation: %s\n"
" Mixer Mode: %s\n"
" Volume Range: %.1f dB to %.1f dB",
" Volume Range: %.1f dB to %.1f dB\n"
" Fault Output: %s",
this->analog_gain_db_,
this->dac_mode_ == DAC_MODE_PBTL ? LOG_STR_LITERAL("PBTL") : LOG_STR_LITERAL("BTL"),
LOG_STR_ARG(mixer_mode), this->volume_min_db_, this->volume_max_db_);
this->modulation_ == MODULATION_1SPW_MODE ? LOG_STR_LITERAL("1SPW") : LOG_STR_LITERAL("BD"),
LOG_STR_ARG(mixer_mode), this->volume_min_db_, this->volume_max_db_, LOG_STR_ARG(fault_output));
#ifdef USE_BINARY_SENSOR
LOG_BINARY_SENSOR(" ", "Any Fault", this->have_fault_binary_sensor_);
for (auto *sensor : this->fault_binary_sensors_) {
+17
View File
@@ -22,6 +22,12 @@ enum DacMode : uint8_t {
DAC_MODE_PBTL = 1, // Parallel bridge tied load, one speaker
};
/// DEVICE_CTRL_1 DAMP_MOD values, the same on all models
enum Modulation : uint8_t {
MODULATION_BD_MODE = 0,
MODULATION_1SPW_MODE = 1,
};
enum MixerMode : uint8_t {
MIXER_MODE_STEREO = 0,
MIXER_MODE_STEREO_INVERSE,
@@ -64,6 +70,8 @@ static_assert(
/// ModelInfo::fault_sensor_bits value for a FaultSensor that the model does not have.
static constexpr uint8_t NO_BIT = 0xFF;
/// fault_output_pin_ value for no fault output
static constexpr uint8_t FAULT_OUTPUT_NONE = 0xFF;
/// Everything that differs between models of the family. One constant instance exists per model, see
/// model_*.cpp, and each TAS58xx instance points to the one for its model.
@@ -91,6 +99,10 @@ struct ModelInfo {
const LogString *(*fault_name)(uint8_t index);
/// Bit index for each FaultSensor, NO_BIT used where the model does not have that fault bit
uint8_t fault_sensor_bits[FAULT_SENSOR_COUNT];
/// Number of pins that can report FAULTZ: pin n is selected at 0x61 + n and enabled by bit n of 0x60
uint8_t fault_output_pins;
/// Name of FAULTZ pin n, for dump_config
const LogString *(*fault_output_name)(uint8_t pin);
};
#ifdef USE_TAS58XX_TAS5805M
@@ -127,7 +139,10 @@ class TAS58xx : public audio_dac::AudioDac, public PollingComponent, public i2c:
void set_enable_pin(GPIOPin *enable_pin) { this->enable_pin_ = enable_pin; }
void set_analog_gain(float analog_gain_db) { this->analog_gain_db_ = analog_gain_db; }
void set_dac_mode(DacMode dac_mode) { this->dac_mode_ = dac_mode; }
/// pin: 0 to 2 for GPIOn on TAS5825M, 0 for ADR on TAS5805M; leave unset for no fault output
void set_fault_output(uint8_t pin) { this->fault_output_pin_ = pin; }
void set_mixer_mode(MixerMode mixer_mode) { this->mixer_mode_ = mixer_mode; }
void set_modulation(Modulation modulation) { this->modulation_ = modulation; }
void set_volume_min_db(float volume_min_db) { this->volume_min_db_ = volume_min_db; }
void set_volume_max_db(float volume_max_db) { this->volume_max_db_ = volume_max_db; }
@@ -171,7 +186,9 @@ class TAS58xx : public audio_dac::AudioDac, public PollingComponent, public i2c:
float volume_max_db_{24.0f};
uint32_t logged_faults_{0}; // Fault bits as last logged, packed like the fault masks
DacMode dac_mode_{DAC_MODE_BTL};
uint8_t fault_output_pin_{FAULT_OUTPUT_NONE}; // No fault output: the pin keeps its power on state
MixerMode mixer_mode_{MIXER_MODE_STEREO};
Modulation modulation_{MODULATION_BD_MODE};
uint8_t ctrl_state_{0};
uint8_t power_state_{0xFF}; // Last POWER_STATE seen by update(), 0xFF until the first read
bool mixer_written_{false}; // Mixer written since the last reset
+11 -8
View File
@@ -5,7 +5,7 @@ from importlib import import_module
from importlib.util import find_spec
import logging
import re
from typing import Any, Literal
from typing import Any, Literal, get_args
from esphome.automation import apply_static_function, parent_ref
import esphome.codegen as cg
@@ -503,7 +503,8 @@ async def _setup_entity_impl(var: MockObj, config: ConfigType, platform: str) ->
config[_KEY_ICON_IDX] = icon_idx
ApplyPublish = Literal["before", "after", "momentary"] | None
ApplyPublishMode = Literal["before", "after", "momentary", "on_success"]
ApplyPublish = ApplyPublishMode | None
@dataclass(frozen=True, slots=True)
@@ -577,7 +578,8 @@ class SubEntities:
With ``apply`` the entity is the domain's ``Apply*`` class and its control runs
``parent->apply``, or ``apply`` as a namespaced free statement when no parent is bound, with
``publish`` ("before"/"after") placing the domain's publish. ``publish="momentary"`` instead
``publish`` ("before"/"after") placing the domain's publish; ``"on_success"`` publishes only when
``apply`` returns true. ``publish="momentary"`` instead
acknowledges first (a switch publishes off) and runs ``apply`` only when turned on. It is only for
legacy action switches; a new action entity is a button.
"""
@@ -600,10 +602,8 @@ class SubEntities:
)
if publish is not None and (apply is None or self.apply_entity.publish is None):
raise ValueError(f"{entity_id}: publish= needs apply= on a stateful domain")
if publish not in (None, "before", "after", "momentary"):
raise ValueError(
f'{entity_id}: publish= must be "before", "after" or "momentary"'
)
if publish is not None and publish not in (modes := get_args(ApplyPublishMode)):
raise ValueError(f"{entity_id}: publish= must be one of {', '.join(modes)}")
if publish == "momentary" and self.apply_entity.momentary is None:
raise ValueError(f'{entity_id}: publish="momentary" is not supported here')
@@ -626,11 +626,14 @@ class SubEntities:
if isinstance(parent, ID):
parent = await get_variable(parent)
apply_entity = self.apply_entity
call = f"{apply};" if parent is None else f"{parent_ref(parent)}->{apply};"
expr = apply if parent is None else f"{parent_ref(parent)}->{apply}"
call = f"{expr};"
if publish == "before":
body = [apply_entity.publish, call]
elif publish == "after":
body = [call, apply_entity.publish]
elif publish == "on_success":
body = [f"if ({expr}) {{ {apply_entity.publish} }}"]
elif publish == "momentary":
acknowledge, condition = apply_entity.momentary
body = [acknowledge, f"if ({condition}) {{ {call} }}"]
+3 -3
View File
@@ -718,9 +718,9 @@ def _clone_or_update_locked(
# compute the same cache key as this one.
original_url = url
if username is not None and password is not None:
url = url.replace(
"://", f"://{urllib.parse.quote(username)}:{urllib.parse.quote(password)}@"
)
user = urllib.parse.quote(username, safe="")
token = urllib.parse.quote(password, safe="")
url = url.replace("://", f"://{user}:{token}@")
hash_dir_name = _compute_destination_path(key, domain).name
repo_dir = _repo_entry_dir(key, domain, subpath)
@@ -138,3 +138,26 @@ def test_task_log_buffer_size_unaligned_allowed_on_libretiny(
) -> None:
set_core_config(PlatformFramework.BK72XX_ARDUINO)
assert validate_task_log_buffer_alignment(641) == 641
@pytest.mark.parametrize(
("config", "log_v2"),
[
pytest.param("test_logger_idf6_esp_idf.yaml", True, id="native"),
pytest.param("test_logger_idf6_platformio.yaml", False, id="platformio"),
],
)
def test_log_v2_only_on_native_toolchain(
generate_main: Callable[[str | Path], str],
config: str,
log_v2: bool,
) -> None:
"""PlatformIO links the bootloader with the app's build flags, so the wrap has no target there."""
from esphome.components.esp32 import KEY_ESP32, KEY_SDKCONFIG_OPTIONS
generate_main(f"tests/component_tests/logger/{config}")
assert ("-Wl,--wrap=esp_log_format" in CORE.build_flags) is log_v2
assert ("USE_ESP32_LOG_V2" in {d.name for d in CORE.defines}) is log_v2
sdkconfig = CORE.data[KEY_ESP32][KEY_SDKCONFIG_OPTIONS]
assert ("CONFIG_LOG_VERSION_2" in sdkconfig) is log_v2
@@ -0,0 +1,11 @@
esphome:
name: test
esp32:
board: esp32dev
toolchain: esp-idf
framework:
type: esp-idf
version: 6.1.0
logger:
@@ -0,0 +1,12 @@
esphome:
name: test
esp32:
board: esp32dev
toolchain: platformio
framework:
type: esp-idf
version: 6.1.0
platform_version: 61.4.0-RC1
logger:
@@ -0,0 +1,31 @@
"""Tests that the TAS58xx fault_output and modulation defaults keep the existing behaviour."""
from __future__ import annotations
from collections.abc import Callable
from pathlib import Path
def test_tas58xx_defaults_keep_the_fault_pin_and_bd_modulation(
generate_main: Callable[[str | Path], str],
) -> None:
"""Without fault_output or modulation each model keeps its usual fault pin and BD modulation."""
main_cpp = generate_main(
"tests/component_tests/tas58xx/test_tas58xx_fault_output_modulation.yaml"
)
assert "amp_5805_default->set_fault_output(0);" in main_cpp
assert "amp_5825_default->set_fault_output(1);" in main_cpp
for amp in ("amp_5805_default", "amp_5825_default", "amp_5805_none"):
assert f"{amp}->set_modulation(tas58xx::MODULATION_BD_MODE);" in main_cpp
def test_tas58xx_fault_output_none_leaves_the_pin_alone(
generate_main: Callable[[str | Path], str],
) -> None:
"""fault_output: none does not configure a fault pin."""
main_cpp = generate_main(
"tests/component_tests/tas58xx/test_tas58xx_fault_output_modulation.yaml"
)
assert "amp_5805_none->set_fault_output(" not in main_cpp
@@ -0,0 +1,26 @@
esphome:
name: test
esp32:
board: esp32dev
i2c:
id: i2c_bus
sda: 21
scl: 22
audio_dac:
- platform: tas58xx
model: tas5805m
id: amp_5805_default
ignore_enable_pin_warning: true
- platform: tas58xx
model: tas5825m
id: amp_5825_default
ignore_enable_pin_warning: true
- platform: tas58xx
model: tas5805m
id: amp_5805_none
address: 0x2C
ignore_enable_pin_warning: true
fault_output: none
+10 -616
View File
@@ -11,14 +11,6 @@ namespace esphome::testing {
// build_plain() compressed with the CLI's window (espota2.DEFLATE_WINDOW_BITS):
// DEFLATED = zlib.compress(plain, 9, wbits=-12)
// STORED = zlib.compress(plain[:300], 0, wbits=-12)
// c = zlib.compressobj(9, zlib.DEFLATED, -12, 9, zlib.Z_FIXED)
// FIXED = c.compress(plain) + c.flush()
// and build_skewed(), whose rare bytes get codes longer than the lookup tables:
// SKEWED = zlib.compress(skewed, 9, wbits=-12)
// and build_mixed() in three parts, so stored blocks follow Huffman blocks:
// c = zlib.compressobj(9, zlib.DEFLATED, -12)
// MIXED = (c.compress(text) + c.flush(zlib.Z_SYNC_FLUSH) + c.compress(noise)
// + c.flush(zlib.Z_SYNC_FLUSH) + c.compress(tail) + c.flush())
static const uint8_t DEFLATED[] = {
0xed, 0xc8, 0xf7, 0x3f, 0xd4, 0x0f, 0x03, 0x00, 0x70, 0x67, 0xaf, 0x4b, 0x67, 0x66, 0x9f, 0x90, 0x91, 0x11, 0xc2,
0x11, 0x91, 0xb8, 0xb3, 0xf7, 0x3a, 0xd9, 0x5f, 0x4e, 0x99, 0x67, 0x1e, 0xce, 0x8a, 0xac, 0xec, 0x59, 0xb8, 0xc2,
@@ -209,532 +201,6 @@ static const uint8_t STORED[] = {
0x68, 0x6f, 0x6d, 0x65, 0x20, 0x6f, 0x74, 0x61, 0x20, 0x64, 0x65, 0x66, 0x6c, 0x61, 0x74, 0x65, 0x20,
};
static const uint8_t FIXED[] = {
0x4b, 0x2d, 0x2e, 0xc8, 0xc8, 0xcf, 0x4d, 0x55, 0xc8, 0x2f, 0x49, 0x54, 0x48, 0x49,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c, 0x11,
0xae, 0xac, 0x1e, 0x20, 0x4c, 0xac, 0x18, 0xe8, 0xa4, 0x14, 0xbf, 0x0a, 0x09, 0x3e, 0xf7, 0xd8, 0x2e, 0x07, 0xc1,
0x9e, 0x13, 0x90, 0xce, 0xa6, 0x69, 0xdb, 0x5a, 0xf8, 0x47, 0x60, 0x1c, 0x4c, 0x71, 0xef, 0xd8, 0x8d, 0x7d, 0x11,
0xbd, 0xce, 0x10, 0x1f, 0x8e, 0xf8, 0xa4, 0x58, 0x30, 0xad, 0xa1, 0xe3, 0xca, 0xb3, 0x2d, 0xc7, 0xd4, 0x52, 0xfe,
0x8d, 0x18, 0xab, 0xd3, 0x22, 0x49, 0x6b, 0xa5, 0x8a, 0xcd, 0xec, 0x5d, 0x66, 0x2e, 0x1d, 0x88, 0xa6, 0xef, 0x03,
0x15, 0x4c, 0x47, 0x47, 0x27, 0xd1, 0x9c, 0x91, 0x27, 0x8d, 0x2f, 0x14, 0x15, 0x0a, 0x8f, 0x03, 0x69, 0xba, 0xed,
0x4e, 0x6b, 0x4b, 0x0b, 0x83, 0xec, 0xf9, 0x54, 0x08, 0x9a, 0xaa, 0xbc, 0x50, 0x18, 0x65, 0xd1, 0x37, 0x23, 0xda,
0x28, 0x44, 0x7e, 0xb7, 0x4f, 0xe4, 0x80, 0xa8, 0xf8, 0x2f, 0xdc, 0xad, 0xaf, 0xb4, 0xfa, 0x7f,
};
static const uint8_t MIXED[] = {
0x4a, 0x2d, 0x2e, 0xc8, 0xc8, 0xcf, 0x4d, 0x55, 0xc8, 0x2f, 0x49, 0x54, 0x48, 0x49, 0x4d, 0xcb, 0x49, 0x2c, 0x49,
0x55, 0x48, 0x1d, 0x15, 0x1b, 0x15, 0x1b, 0x15, 0x1b, 0x15, 0x1b, 0x84, 0x62, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff,
0x00, 0xb8, 0x0b, 0x47, 0xf4, 0x53, 0xc3, 0x7d, 0x78, 0x8e, 0xb4, 0x4d, 0x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, 0xe7, 0xda, 0xbb,
0x27, 0x70, 0x12, 0xef, 0x03, 0x43, 0xe2, 0x85, 0x7b, 0x02, 0x92, 0x48, 0x11, 0x94, 0x53, 0xe4, 0x76, 0x8d, 0x3f,
0x30, 0xed, 0x5c, 0x15, 0x3e, 0x5d, 0x37, 0xb0, 0x24, 0x39, 0xc7, 0x4c, 0x89, 0x10, 0x93, 0x79, 0xef, 0xf3, 0x2d,
0xdb, 0xc2, 0x8a, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1b, 0xed, 0xbb, 0x8c, 0x8a, 0x8d, 0x8a, 0xe1, 0x16, 0x03, 0x00,
};
static constexpr size_t WINDOW = 4096;
static constexpr size_t PLAIN_SIZE = 16000;
@@ -757,55 +223,18 @@ static std::vector<uint8_t> build_plain() {
return plain;
}
// Text, incompressible noise that zlib stores, then text again
static std::vector<uint8_t> build_mixed() {
std::vector<uint8_t> plain;
const char *text = "esphome ota deflate ";
for (int i = 0; i < 60; i++)
plain.insert(plain.end(), text, text + strlen(text));
uint32_t x = 3;
for (int i = 0; i < 3000; i++)
plain.push_back(lcg_next(x));
for (int i = 0; i < 40; i++)
plain.insert(plain.end(), text, text + strlen(text));
return plain;
}
static std::vector<uint8_t> build_skewed() {
std::vector<uint8_t> plain;
const char *common = "etaoin ";
uint32_t x = 7;
for (int i = 0; i < 6000; i++) {
uint8_t r = lcg_next(x);
plain.push_back(r < 230 ? common[r % 7] : lcg_next(x));
}
return plain;
}
// Mirrors the OTA session: chunked input through the read callback, window as output
struct Session : OtaInflateState {
const uint8_t *in;
size_t in_len;
size_t in_pos;
size_t chunk;
// Like the session where the ack follows the write: output is taken
// before each read, up to dest
bool flush_in_read;
size_t flushed;
std::vector<uint8_t> out;
uint8_t window[WINDOW];
};
static void take_output(Session &s) {
const size_t produced = s.dest - s.window;
s.out.insert(s.out.end(), s.window + s.flushed, s.window + produced);
s.flushed = produced;
}
static int read_cb(OtaInflateState *d) {
auto *s = static_cast<Session *>(d);
if (s->flush_in_read)
take_output(*s);
if (s->in_pos >= s->in_len)
return -1;
size_t n = std::min(s->chunk, s->in_len - s->in_pos);
@@ -816,26 +245,23 @@ static int read_cb(OtaInflateState *d) {
}
// Inflates the whole input; returns the decoder result and fills s.out
static int inflate_all(Session &s, const uint8_t *in, size_t in_len, size_t chunk, bool flush_in_read = false) {
static int inflate_all(Session &s, const uint8_t *in, size_t in_len, size_t chunk) {
s.in = in;
s.in_len = in_len;
s.in_pos = 0;
s.chunk = chunk;
s.flush_in_read = flush_in_read;
s.flushed = 0;
s.out.clear();
memset(s.window, 0, sizeof(s.window));
ota_inflate_init(&s, s.window, WINDOW);
s.source_read_cb = read_cb;
int res;
do {
// Starts the window over once the previous call filled it
s.dest = s.window;
s.dest_limit = s.window + WINDOW;
res = ota_inflate(&s);
if (res < 0 || s.eof)
return res < 0 ? res : OTA_INFLATE_DATA_ERROR;
take_output(s);
// A full window is taken; the next call starts it over
s.flushed = 0;
s.out.insert(s.out.end(), s.window, s.dest);
if (s.out.size() > PLAIN_SIZE)
return OTA_INFLATE_DATA_ERROR;
} while (res != OTA_INFLATE_DONE);
@@ -863,36 +289,6 @@ TEST(OtaInflate, StoredBlock) {
EXPECT_EQ(s->out, plain);
}
// Dynamic blocks, fixed Huffman blocks, codes longer than the lookup tables, and
// stored blocks that start with read ahead bits in the bit buffer
struct Stream {
const uint8_t *data;
size_t len;
std::vector<uint8_t> (*plain)();
};
static const Stream STREAMS[] = {{DEFLATED, sizeof(DEFLATED), build_plain},
{FIXED, sizeof(FIXED), build_plain},
{SKEWED, sizeof(SKEWED), build_skewed},
{MIXED, sizeof(MIXED), build_mixed}};
TEST(OtaInflate, EveryReadSizeGivesTheSameOutput) {
// 1 byte reads never leave enough input for the fast loop, 11 to 13 straddle
// its threshold, and the larger ones run it across read and window boundaries
auto s = std::make_unique<Session>();
for (const auto &stream : STREAMS) {
const auto plain = stream.plain();
for (bool flush_in_read : {false, true}) {
for (size_t chunk : {size_t{1}, size_t{11}, size_t{12}, size_t{13}, size_t{300}, size_t{1040}, stream.len}) {
ASSERT_EQ(inflate_all(*s, stream.data, stream.len, chunk, flush_in_read), OTA_INFLATE_DONE)
<< "stream of " << stream.len << " B, read size " << chunk << ", flush in read " << flush_in_read;
EXPECT_EQ(s->out, plain) << "stream of " << stream.len << " B, read size " << chunk << ", flush in read "
<< flush_in_read;
EXPECT_EQ(s->in_pos, stream.len);
}
}
}
}
TEST(OtaInflate, TruncatedStreamFails) {
auto s = std::make_unique<Session>();
for (size_t cut : {size_t{1}, size_t{100}, size_t{1000}, sizeof(DEFLATED) - 1}) {
@@ -909,14 +305,12 @@ TEST(OtaInflate, TruncatedStoredBlockFails) {
TEST(OtaInflate, CorruptStreamsNeverEscapeTheWindow) {
// Flipped bytes and garbage; the sanitizers check the decoder stays in bounds
auto s = std::make_unique<Session>();
for (const auto &stream : STREAMS) {
std::vector<uint8_t> bad(stream.data, stream.data + stream.len);
// A coarse, non-aligned stride: neighbouring offsets hit the same paths
for (size_t i = 0; i < bad.size(); i += 29) {
bad[i] ^= 0x5a;
inflate_all(*s, bad.data(), bad.size(), 1040);
bad[i] ^= 0x5a;
}
std::vector<uint8_t> bad(DEFLATED, DEFLATED + sizeof(DEFLATED));
// A coarse, non-aligned stride: neighbouring offsets hit the same paths
for (size_t i = 0; i < bad.size(); i += 29) {
bad[i] ^= 0x5a;
inflate_all(*s, bad.data(), bad.size(), 1040);
bad[i] ^= 0x5a;
}
uint32_t x = 99;
std::vector<uint8_t> garbage(2000);
+6
View File
@@ -0,0 +1,6 @@
from tests.testing_helpers import ComponentManifestOverride
def override_manifest(manifest: ComponentManifestOverride) -> None:
# The DAC is an audio_dac platform on I2C; the tests drive its power switch.
manifest.dependencies = manifest.dependencies + ["audio_dac", "i2c", "switch"]
+4
View File
@@ -33,3 +33,7 @@ switch:
pcm5122: pcm5122_dac
name: PCM5122 Power Down
power_mode: powerdown
- platform: pcm5122
pcm5122: pcm5122_dac
name: PCM5122 Standby
power_mode: standby
@@ -0,0 +1,102 @@
#include <gtest/gtest.h>
#include <array>
#include "esphome/components/pcm5122/pcm5122.h"
#include "esphome/components/switch/switch.h"
namespace esphome::pcm5122::testing {
static constexpr uint8_t ADDRESS = 0x4D;
// The bodies codegen emits for power_mode: standby and power_mode: powerdown.
static PCM5122 *dac = nullptr; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
static void standby(switch_::Switch *entity, bool state) {
if (dac->set_standby(state))
entity->publish_state(state);
}
static void powerdown(switch_::Switch *entity, bool state) {
if (dac->set_powerdown(state))
entity->publish_state(state);
}
// Page 0 registers written as register/value pairs; failing writes are not acknowledged.
class RegisterBus final : public i2c::I2CBus {
public:
i2c::ErrorCode write_readv(uint8_t address, const uint8_t *data, size_t size, uint8_t * /*out*/,
size_t /*out_size*/) override {
EXPECT_EQ(address, ADDRESS);
if (this->fail)
return i2c::ERROR_NOT_ACKNOWLEDGED;
if (size == 2)
this->registers[data[0]] = data[1];
return i2c::ERROR_OK;
}
std::array<uint8_t, 256> registers{};
bool fail{false};
};
class PCM5122PowerSwitchTest : public ::testing::Test {
protected:
void SetUp() override {
this->dac_.set_i2c_bus(&this->bus_);
this->dac_.set_i2c_address(ADDRESS);
dac = &this->dac_;
this->standby_.add_on_state_callback([this](bool) { ++this->publishes_; });
this->powerdown_.add_on_state_callback([this](bool) { ++this->publishes_; });
}
uint8_t power_control_() const { return this->bus_.registers[PCM5122_REG_POWER_CONTROL]; }
RegisterBus bus_;
PCM5122 dac_;
switch_::ApplySwitch<standby> standby_;
switch_::ApplySwitch<powerdown> powerdown_;
unsigned publishes_{0};
};
TEST_F(PCM5122PowerSwitchTest, StandbySwitchRequestsStandbyAndPublishes) {
this->standby_.turn_on();
EXPECT_EQ(this->power_control_(), PCM5122_POWER_CONTROL_RQST);
EXPECT_TRUE(this->standby_.state);
EXPECT_EQ(this->publishes_, 1u);
this->standby_.turn_off();
EXPECT_EQ(this->power_control_(), 0);
EXPECT_FALSE(this->standby_.state);
EXPECT_EQ(this->publishes_, 2u);
}
TEST_F(PCM5122PowerSwitchTest, PowerdownSwitchRequestsPowerdownAndPublishes) {
this->powerdown_.turn_on();
EXPECT_EQ(this->power_control_(), PCM5122_POWER_CONTROL_RQPD);
EXPECT_TRUE(this->powerdown_.state);
EXPECT_EQ(this->publishes_, 1u);
this->powerdown_.turn_off();
EXPECT_EQ(this->power_control_(), 0);
EXPECT_FALSE(this->powerdown_.state);
EXPECT_EQ(this->publishes_, 2u);
}
TEST_F(PCM5122PowerSwitchTest, FailedWriteLeavesTheSwitchUnpublished) {
this->bus_.fail = true;
this->standby_.turn_on();
this->powerdown_.turn_on();
EXPECT_EQ(this->publishes_, 0u);
EXPECT_FALSE(this->standby_.has_state());
EXPECT_FALSE(this->powerdown_.has_state());
}
TEST_F(PCM5122PowerSwitchTest, FailedWriteDoesNotLeakIntoTheNextRequest) {
this->bus_.fail = true;
this->standby_.turn_on();
this->bus_.fail = false;
this->powerdown_.turn_on();
EXPECT_EQ(this->power_control_(), PCM5122_POWER_CONTROL_RQPD);
EXPECT_FALSE(this->standby_.has_state());
EXPECT_TRUE(this->powerdown_.state);
}
} // namespace esphome::pcm5122::testing
@@ -0,0 +1,6 @@
from tests.testing_helpers import ComponentManifestOverride
def override_manifest(manifest: ComponentManifestOverride) -> None:
# Builds the power switch platform against the DAC.
manifest.dependencies = manifest.dependencies + ["pcm5122"]
+2
View File
@@ -7,7 +7,9 @@ audio_dac:
enable_pin: GPIO12
analog_gain: -15.5dB
dac_mode: btl
fault_output: adr
mixer_mode: stereo
modulation: 1SPW_MODE
volume_min_db: -60dB
volume_max_db: 0dB
update_interval: 1s
@@ -9,3 +9,4 @@ audio_dac:
dac_mode: PBTL
mixer_mode: mono
analog_gain: -3.5dB
fault_output: none
@@ -1711,6 +1711,14 @@ _SELECT_APPLY = entity_helpers.ApplyEntity(
"after",
"::hub->set_mode(index, options_);\nentity->publish_state(index);",
),
(
"set_mode(option)",
"on_success",
(
"const char *option = entity->option_at(index);\n"
"if (::hub->set_mode(option)) { entity->publish_state(index); }"
),
),
],
)
async def test_sub_entities_apply_locals(
@@ -1883,6 +1891,35 @@ async def test_sub_entities_apply_momentary(
assert apply_functions[0][2] == body
@pytest.mark.asyncio
@pytest.mark.parametrize(
("parent", "apply", "body"),
[
(
_HUB,
"write_level(state)",
"if (::hub->write_level(state)) { entity->publish_state(state); }",
),
(
None,
"chip::write_level(state)",
"if (chip::write_level(state)) { entity->publish_state(state); }",
),
],
)
async def test_sub_entities_apply_on_success(
setup_test_environment: list[str],
apply_functions: list[tuple[str, str, str]],
parent: MockObj | None,
apply: str,
body: str,
) -> None:
"""publish="on_success" publishes only when the hub call returns true."""
sub = _apply_sub([], {"k": _apply_conf("k_sw")}, parent=parent)
await sub("k", None, apply=apply, publish="on_success")
assert apply_functions[0][2] == body
@pytest.mark.asyncio
async def test_sub_entities_apply_without_parent_needs_namespaced_call(
setup_test_environment: list[str],
+43
View File
@@ -10,6 +10,7 @@ import threading
import time
from typing import Any
from unittest.mock import Mock, patch
import urllib.parse
from filelock import FileLock
import pytest
@@ -2097,6 +2098,48 @@ def test_recovery_reclone_keeps_credentials_and_cache_key(
assert clone_url.count("@") == 1
def test_clone_credentials_with_slash_are_escaped(
tmp_path: Path, mock_run_git_command: Mock
) -> None:
"""A "/" in the username or password must be percent-encoded, or the
userinfo ends at the "/" and git reports the password in its error."""
CORE.config_path = tmp_path / "test.yaml"
url = "https://github.com/test/repo"
domain = "test"
repo_dir = _compute_repo_dir(url, None, domain)
def git_command_side_effect(
cmd: list[str], cwd: str | None = None, **kwargs: Any
) -> str:
if _get_git_command_type(cmd) == "clone":
_simulate_cloned_repo(repo_dir)
return ""
mock_run_git_command.side_effect = git_command_side_effect
git.clone_or_update(
url=url,
ref=None,
refresh=TimePeriodSeconds(days=1),
domain=domain,
username="team/user",
password="ab/cd@ef",
)
clone_cmds = [
c[0][0]
for c in mock_run_git_command.call_args_list
if _get_git_command_type(c[0][0]) == "clone"
]
assert clone_cmds
clone_url = clone_cmds[0][-2]
assert clone_url == "https://team%2Fuser:ab%2Fcd%40ef@github.com/test/repo"
assert urllib.parse.urlsplit(clone_url).hostname == "github.com"
redacted = git._redact_url_credentials(f"fatal: unable to access '{clone_url}/'")
assert redacted == "fatal: unable to access 'https://***@github.com/test/repo/'"
def test_refresh_submodule_failure_recovers_then_raises(
tmp_path: Path, mock_run_git_command: Mock
) -> None: