添加灯光管理、自动化和脚本功能,更新依赖项,完善文档
This commit is contained in:
16
test/script.ts
Normal file
16
test/script.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { script, showMore } from './common.ts';
|
||||
|
||||
const scripts = await script.getScripts();
|
||||
|
||||
const values = scripts.map(e => {
|
||||
return {
|
||||
entity_id: e.entity_id,
|
||||
state: e.state,
|
||||
attributes: e.attributes,
|
||||
last_changed: e.last_changed,
|
||||
last_updated: e.last_updated,
|
||||
};
|
||||
});
|
||||
console.log(showMore(values));
|
||||
|
||||
console.log(`实体数量: ${scripts.length}`);
|
||||
Reference in New Issue
Block a user