Update xiaoshi-device-consumables-button.js

This commit is contained in:
xiaoshi
2025-12-27 14:00:40 +08:00
committed by GitHub
parent 0d61619f8d
commit b357b69fa5

View File

@@ -1863,7 +1863,7 @@ class XiaoshiConsumablesButton extends LitElement {
const buttonIcon = this.config.button_icon || 'mdi:battery-sync';
// 设置背景颜色
const buttonBgColor = transparentBg ? 'transparent' : theme === 'on' ? 'rgb(255, 255, 255, 0.6)' : 'rgb(80, 80, 80, 0.6)';
const buttonBgColor = transparentBg ? 'transparent' : theme === 'on' ? 'rgb(255, 255, 255, 0.6)' : 'rgb(83, 83, 83, 0.6)';
// 检查是否需要自动隐藏只有数据加载完成且数量为0时才考虑隐藏
const shouldAutoHide = this._dataLoaded && autoHide && warningCount === 0;