『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
楼主: 倾微qiwe

[新奇玩法] 〖Custom_UI〗【6.10更新】多功能按钮的自定义UI发布,及教程

  [复制链接]

2

主题

237

帖子

1722

积分

金牌会员

Rank: 6Rank: 6

积分
1722
金钱
1485
HASS币
0
发表于 2018-6-6 10:50:13 | 显示全部楼层
不错的思路
回复

使用道具 举报

2

主题

84

帖子

412

积分

论坛分享达人

积分
412
金钱
328
HASS币
0
发表于 2018-6-6 11:32:14 | 显示全部楼层
向大神学习
回复

使用道具 举报

2

主题

82

帖子

251

积分

中级会员

Rank: 3Rank: 3

积分
251
金钱
169
HASS币
0
发表于 2018-6-6 12:52:11 | 显示全部楼层
刚试了下,报错如下,显示也不全:
2018-06-06 12:41:05 ERROR (MainThread) [frontend.js.latest.201805310] data:text/javascript;charset=utf-8,%0A%20%20const%20author%20%3D%20'Qinver'%3B%0A%20%20Polymer(%7B%0A%20%20%20%20is%3A%20'state-card-button'%2C%0A%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20hass%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20stateObj%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20config%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20computed%3A%20'computeConfig(stateObj)'%2C%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%7D%2C%0A%20%20%20%20computeConfig%3A%20function%20(stateObj)%20%7B%20%20%20%20%20%0A%20%20%20%20%20%20return%20stateObj.attributes.config%3B%0A%20%20%20%20%7D%2C%0A%20%20%20%20ready%3A%20function%20(hass%2C%20config)%20%7B%0A%20%20%20%20%20%20var%20config%20%3D%20this.config%3B%0A%20%20%20%20%20%20this.updateStyles(%7B%0A%20%20%20%20%20%20%20%20'--tiles-width'%3A%20config.width%20%3F%20config.width%20%3A%20'32px'%2C%0A%20%20%20%20%20%20%20%20'--tiles-height'%3A%20config.height%20%3F%20config.height%20%3A%20'32px'%2C%0A%20%20%20%20%20%20%20%20'--tiles-gap'%3A%20config.gap%20%3F%20config.gap%20%3A%20'8px'%2C%0A%20%20%20%20%20%20%20%20'--border-radius'%20%3A%20config.border_radius%20%3F%20config.border_radius%20%3A%20'5px'%2C%0A%20%20%20%20%20%20%20%20'--ha-entity-toggle-gap-display'%3A%20config.ha_entity_toggle_display%20%3F%20config.ha_entity_toggle_display%20%3A%20'inline'%2C%0A%20%20%20%20%20%20%20%20'--group-margin-right'%3A%20config.ha_entity_toggle_display%20%3F%20'-3px'%20%3A%20'6px'%2C%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%2C%0A%20%20%20%20computeExtra%3A%20function%20(hass%2C%20entity_id%2C%20stateObj)%20%7B%0A%20%20%20%20%20%20var%20title%20%3D%20entity_id.title%20%3F%20entity_id.title%20%3A%20''%3B%20%20%20%20%20%0A%20%20%20%20%20%20var%20attribute%20%3D%20entity_id.attribute%20%3F%20entity_id.attribute%20%3A%20''%3B%0A%20%20%20%20%20%20var%20unit%20%3D%20entity_id.unit%20%3F%20entity_id.unit%20%3A%20''%3B%0A%20%20%20%20%20%20var%20zhi%20%3D%20entity_id.attribute%20%3F%20(hass.states%5Bentity_id.entity_id%5D.attributes%5Battribute%5D)%20%3A%20(hass.states%5Bentity_id.entity_id%5D.state)%3B%0A%20%20%20%20%20%20var%20ecc%20%3D%20(hass.states%5Bentity_id.entity_id%5D.attributes.current_temperature)%20%3F%20'%2F'%20%2B(hass.states%5Bentity_id.entity_id%5D.attributes.current_temperature)%20%2B%20'%E2%84%83'%20%3A%20''%3B%20%20%20%20%20%20%0A%20%20%20%20%20%20var%20ec%20%3D%20(hass.states%5Bentity_id.entity_id%5D.state)%20%2B%20'%20'%20%2B%20%20(hass.states%5Bentity_id.entity_id%5D.attributes.temperature)%20%2B%20'%E2%84%83'%20%2B%20ecc%3B%0A%20%20%20%20%20%20var%20id%20%3D%20entity_id.entity_id%3B%0A%20%20%20%20%20%20var%20cpt%20%3D%20id.split('.')%5B0%5D%3B%0A%20%20%20%20%20%20if%20(cpt%20%3D%3D%3D%20'climate')%20%7B%0A%20%20%20%20%20%20var%20zhi%20%3D%20entity_id.attribute%20%3F%20(hass.states%5Bentity_id.entity_id%5D.attributes%5Battribute%5D)%20%3A%20ec%3B%0A%20%20%20%20%20%20%7D%20else%7B%7D%0A%20%20%20%20%20%20%20%20return%20zhi%20%3F%20title%20%2B%20zhi%20%2B%20unit%20%3A%20''%3B%0A%20%20%20%20%7D%2C%0A%20%20%20%20computeTileStyle%3A%20function%20(hass%2C%20entity)%20%7B%0A%20%20%20%20%20%20var%20con%20%3D%20entity.color_on%20%3F%20entity.color_on%20%3A%20'var(--paper-toggle-button-checked-button-color)'%3B%0A%20%20%20%20%20%20var%20coff%20%3D%20entity.color_off%20%3F%20entity.color_off%20%3A%20'var(--primary-text-color)'%3B%0A%20%20%20%20%20%20var%20bcon%20%3D%20entity.background_color_on%20%3F%20entity.background_color_on%20%3A%20'rgba(0%2C%200%2C%200%2C0)'%3B%0A%20%20%20%20%20%20var%20bcoff%20%3D%20entity.background_color_off%20%3F%20entity.background_color_off%20%3A%20'rgba(0%2C%200%2C%200%2C0)'%3B%0A%20%20%20%20%20%20var%20img%20%3D%20entity.image%20%3F%20'%20background-image%3A%20url(%22'%20%2B%20entity.image%20%2B%20'%22)%3B'%20%3A%20''%3B%0A%20%20%20%20%20%20var%20imgh%20%3D%20entity.image_height%20%3F%20'%20background-size%3A%20auto%20'%20%2B%20entity.image_height%20%2B%20'%3B'%20%3A%20'background-size%3Aauto%2022px%3B'%3B%0A%20%20%20%20%20%20var%20booff%20%3D%20'background-color%3A%20'%20%2B%20bcoff%20%2B%20'%3B%20color%3A%20'%20%2B%20coff%20%2B%20'%3B'%20%2B%20%20img%20%2B%20%20imgh%3B%0A%20%20%20%20%20%20var%20boon%20%3D%20'background-color%3A%20'%20%2B%20bcon%20%2B%20'%3B%20color%3A%20'%20%2B%20con%20%2B%20'%3B'%20%2B%20%20img%20%2B%20%20imgh%3B%0A%20%20%20%20%20%20return%20(hass.states%5Bentity.entity%5D.state%20%3D%3D%3D%20'on')%20%3F%20boon%20%3A%20booff%3B%0A%20%20%20%20%7D%2C%0A%20%20%20%20computetoggleStyle%3A%20function%20(hass%2C%20entity_id%2C%20config)%20%7B%0A%20%20%20%20%20%20var%20txs%20%3D%20config.ha_entity_toggle_display%20%3F%20config.ha_entity_toggle_display%20%3A%20'inline'%3B%0A%20%20%20%20%20%20var%20tid%20%3D%20this.stateObj.entity_id%3B%0A%20%20%20%20%20%20var%20tcpt%20%3D%20tid.split('.')%5B0%5D%3B%0A%20%20%20%20%20%20if%20((tcpt%20%3D%3D%3D%20'climate')%7C%7C(tcpt%20%3D%3D%3D%20'binary_sensor')%7C%7C(tcpt%20%3D%3D%3D%20'device_tracker')%7C%7C(tcpt%20%3D%3D%3D%20'input_number')%7C%7C(tcpt%20%3D%3D%3D%20'sensor')%7C%7C(tcpt%20%3D%3D%3D%20'zone')%7C%7C(tcpt%20%3D%3D%3D%20'sun'))%7B%0A%20%20%20%20%20%20%20%20return%20'display%3A%20none%3B'%3B%0A%20%20%20%20%20%20%7D%20else%7B%0A%20%20%20%20%20%20%20%20return%20'display%3A'%20%2B%20txs%20%2B%20'%3B'%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%20%20%20%20computestateStyle%3A%20function%20(hass%2C%20entity_id%2C%20config)%20%7B%0A%20%20%20%20%20%20var%20sxs%20%3D%20config.ha_entity_toggle_display%20%3F%20config.ha_entity_toggle_display%20%3A%20'flex'%3B%0A%20%20%20%20%20%20var%20tid%20%3D%20this.stateObj.entity_id%3B%0A%20%20%20%20%20%20var%20tcpt%20%3D%20tid.split('.')%5B0%5D%3B%0A%20%20%20%20%20%20if%20((tcpt%20!%3D%20'climate')%26%26(tcpt%20!%3D%20'binary_sensor')%26%26(tcpt%20!%3D%20'device_tracker')%26%26(tcpt%20!%3D%20'input_number')%26%26(tcpt%20!%3D%20'sensor')%26%26(tcpt%20!%3D%20'zone')%26%26(tcpt%20!%3D%20'sun'))%7B%0A%20%20%20%20%20%20%20%20return%20'display%3A%20none%3B'%3B%0A%20%20%20%20%20%20%7D%20else%7B%0A%20%20%20%20%20%20%20%20return%20'display%3A'%20%2B%20sxs%20%2B%20'%3Bmargin%3Aauto%3B'%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%20%20%20computeunitStyle%3A%20function%20(hass%2C%20entity_id%2C%20config)%20%7B%0A%20%20%20%20%20%20var%20tid%20%3D%20this.stateObj.entity_id%3B%0A%20%20%20%20%20%20var%20tcpt%20%3D%20tid.split('.')%5B0%5D%3B%0A%20%20%20%20%20%20if%20(tcpt%20%3D%3D%3D%20'sensor')%7B%0A%20%20%20%20%20%20%20%20return%20'margin%3Aauto%3B'%3B%0A%20%20%20%20%20%20%7D%20else%7B%0A%20%20%20%20%20%20%20%20return%20'display%3A%20none%3B'%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%20%20%20%20callService%3A%20function%20(e)%20%7B%0A%20%20%20%20%20%20var%20entity%20%3D%20e.model.entity.entity%3B%0A%20%20%20%20%20%20var%20domain%20%3D%20entity.split('.')%5B0%5D%3B%0A%20%20%20%20%20%20if%20(domain%20%3D%3D%3D%20'script')%20%7B%0A%20%20%20%20%20%20%20%20var%20service%20%3D%20entity.split('.')%5B1%5D%3B%0A%20%20%20%20%20%20%20%20var%20data%20%3D%20e.model.entity.data%20%3F%20(e.model.entity.data)%20%3A%20%7B%7D%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20var%20service%20%3D%20e.model.entity.service%20%3F%20e.model.entity.service.split('.')%5B1%5D%20%3A%20'toggle'%3B%0A%20%20%20%20%20%20%20%20var%20data%20%3D%20e.model.entity.data%20%3F%20(e.model.entity.data)%20%3A%20%7B%20'entity_id'%3A%20entity%20%7D%3B%0A%20%20%20%20%20%20%7D%20%20%20%20%20%20%20%0A%20%20%20%20%20%20this.hass.callService(domain%2Cservice%2Cdata)%3B%0A%20%20%20%20%7D%2C%0A%20%20%20%20stopPropagation(t)%7B%0A%20%20%20%20%20%20t.stopPropagation()%3B%0A%20%20%20%20%7D%2C%0A%20%20%7D)%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttp%3A%2F%2Fxxxxx.f3322.net%3A8084%2Flocal%2Fcustom_ui%2Fstate-card-button.html.js%0A:0:0 Script error.
2018-06-06 12:41:06 ERROR (MainThread) [frontend.js.latest.201805310] data:text/javascript;charset=utf-8,%0A%20%20const%20author%20%3D%20'Qinver'%3B%0A%20%20Polymer(%7B%0A%20%20%20%20is%3A%20'state-card-button'%2C%0A%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20hass%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20stateObj%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20config%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20computed%3A%20'computeConfig(stateObj)'%2C%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%7D%2C%0A%20%20%20%20computeConfig%3A%20function%20(stateObj)%20%7B%20%20%20%20%20%0A%20%20%20%20%20%20return%20stateObj.attributes.config%3B%0A%20%20%20%20%7D%2C%0A%20%20%20%20ready%3A%20function%20(hass%2C%20config)%20%7B%0A%20%20%20%20%20%20var%20config%20%3D%20this.config%3B%0A%20%20%20%20%20%20this.updateStyles(%7B%0A%20%20%20%20%20%20%20%20'--tiles-width'%3A%20config.width%20%3F%20config.width%20%3A%20'32px'%2C%0A%20%20%20%20%20%20%20%20'--tiles-height'%3A%20config.height%20%3F%20config.height%20%3A%20'32px'%2C%0A%20%20%20%20%20%20%20%20'--tiles-gap'%3A%20config.gap%20%3F%20config.gap%20%3A%20'8px'%2C%0A%20%20%20%20%20%20%20%20'--border-radius'%20%3A%20config.border_radius%20%3F%20config.border_radius%20%3A%20'5px'%2C%0A%20%20%20%20%20%20%20%20'--ha-entity-toggle-gap-display'%3A%20config.ha_entity_toggle_display%20%3F%20config.ha_entity_toggle_display%20%3A%20'inline'%2C%0A%20%20%20%20%20%20%20%20'--group-margin-right'%3A%20config.ha_entity_toggle_display%20%3F%20'-3px'%20%3A%20'6px'%2C%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%2C%0A%20%20%20%20computeExtra%3A%20function%20(hass%2C%20entity_id%2C%20stateObj)%20%7B%0A%20%20%20%20%20%20var%20title%20%3D%20entity_id.title%20%3F%20entity_id.title%20%3A%20''%3B%20%20%20%20%20%0A%20%20%20%20%20%20var%20attribute%20%3D%20entity_id.attribute%20%3F%20entity_id.attribute%20%3A%20''%3B%0A%20%20%20%20%20%20var%20unit%20%3D%20entity_id.unit%20%3F%20entity_id.unit%20%3A%20''%3B%0A%20%20%20%20%20%20var%20zhi%20%3D%20entity_id.attribute%20%3F%20(hass.states%5Bentity_id.entity_id%5D.attributes%5Battribute%5D)%20%3A%20(hass.states%5Bentity_id.entity_id%5D.state)%3B%0A%20%20%20%20%20%20var%20ecc%20%3D%20(hass.states%5Bentity_id.entity_id%5D.attributes.current_temperature)%20%3F%20'%2F'%20%2B(hass.states%5Bentity_id.entity_id%5D.attributes.current_temperature)%20%2B%20'%E2%84%83'%20%3A%20''%3B%20%20%20%20%20%20%0A%20%20%20%20%20%20var%20ec%20%3D%20(hass.states%5Bentity_id.entity_id%5D.state)%20%2B%20'%20'%20%2B%20%20(hass.states%5Bentity_id.entity_id%5D.attributes.temperature)%20%2B%20'%E2%84%83'%20%2B%20ecc%3B%0A%20%20%20%20%20%20var%20id%20%3D%20entity_id.entity_id%3B%0A%20%20%20%20%20%20var%20cpt%20%3D%20id.split('.')%5B0%5D%3B%0A%20%20%20%20%20%20if%20(cpt%20%3D%3D%3D%20'climate')%20%7B%0A%20%20%20%20%20%20var%20zhi%20%3D%20entity_id.attribute%20%3F%20(hass.states%5Bentity_id.entity_id%5D.attributes%5Battribute%5D)%20%3A%20ec%3B%0A%20%20%20%20%20%20%7D%20else%7B%7D%0A%20%20%20%20%20%20%20%20return%20zhi%20%3F%20title%20%2B%20zhi%20%2B%20unit%20%3A%20''%3B%0A%20%20%20%20%7D%2C%0A%20%20%20%20computeTileStyle%3A%20function%20(hass%2C%20entity)%20%7B%0A%20%20%20%20%20%20var%20con%20%3D%20entity.color_on%20%3F%20entity.color_on%20%3A%20'var(--paper-toggle-button-checked-button-color)'%3B%0A%20%20%20%20%20%20var%20coff%20%3D%20entity.color_off%20%3F%20entity.color_off%20%3A%20'var(--primary-text-color)'%3B%0A%20%20%20%20%20%20var%20bcon%20%3D%20entity.background_color_on%20%3F%20entity.background_color_on%20%3A%20'rgba(0%2C%200%2C%200%2C0)'%3B%0A%20%20%20%20%20%20var%20bcoff%20%3D%20entity.background_color_off%20%3F%20entity.background_color_off%20%3A%20'rgba(0%2C%200%2C%200%2C0)'%3B%0A%20%20%20%20%20%20var%20img%20%3D%20entity.image%20%3F%20'%20background-image%3A%20url(%22'%20%2B%20entity.image%20%2B%20'%22)%3B'%20%3A%20''%3B%0A%20%20%20%20%20%20var%20imgh%20%3D%20entity.image_height%20%3F%20'%20background-size%3A%20auto%20'%20%2B%20entity.image_height%20%2B%20'%3B'%20%3A%20'background-size%3Aauto%2022px%3B'%3B%0A%20%20%20%20%20%20var%20booff%20%3D%20'background-color%3A%20'%20%2B%20bcoff%20%2B%20'%3B%20color%3A%20'%20%2B%20coff%20%2B%20'%3B'%20%2B%20%20img%20%2B%20%20imgh%3B%0A%20%20%20%20%20%20var%20boon%20%3D%20'background-color%3A%20'%20%2B%20bcon%20%2B%20'%3B%20color%3A%20'%20%2B%20con%20%2B%20'%3B'%20%2B%20%20img%20%2B%20%20imgh%3B%0A%20%20%20%20%20%20return%20(hass.states%5Bentity.entity%5D.state%20%3D%3D%3D%20'on')%20%3F%20boon%20%3A%20booff%3B%0A%20%20%20%20%7D%2C%0A%20%20%20%20computetoggleStyle%3A%20function%20(hass%2C%20entity_id%2C%20config)%20%7B%0A%20%20%20%20%20%20var%20txs%20%3D%20config.ha_entity_toggle_display%20%3F%20config.ha_entity_toggle_display%20%3A%20'inline'%3B%0A%20%20%20%20%20%20var%20tid%20%3D%20this.stateObj.entity_id%3B%0A%20%20%20%20%20%20var%20tcpt%20%3D%20tid.split('.')%5B0%5D%3B%0A%20%20%20%20%20%20if%20((tcpt%20%3D%3D%3D%20'climate')%7C%7C(tcpt%20%3D%3D%3D%20'binary_sensor')%7C%7C(tcpt%20%3D%3D%3D%20'device_tracker')%7C%7C(tcpt%20%3D%3D%3D%20'input_number')%7C%7C(tcpt%20%3D%3D%3D%20'sensor')%7C%7C(tcpt%20%3D%3D%3D%20'zone')%7C%7C(tcpt%20%3D%3D%3D%20'sun'))%7B%0A%20%20%20%20%20%20%20%20return%20'display%3A%20none%3B'%3B%0A%20%20%20%20%20%20%7D%20else%7B%0A%20%20%20%20%20%20%20%20return%20'display%3A'%20%2B%20txs%20%2B%20'%3B'%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%20%20%20%20computestateStyle%3A%20function%20(hass%2C%20entity_id%2C%20config)%20%7B%0A%20%20%20%20%20%20var%20sxs%20%3D%20config.ha_entity_toggle_display%20%3F%20config.ha_entity_toggle_display%20%3A%20'flex'%3B%0A%20%20%20%20%20%20var%20tid%20%3D%20this.stateObj.entity_id%3B%0A%20%20%20%20%20%20var%20tcpt%20%3D%20tid.split('.')%5B0%5D%3B%0A%20%20%20%20%20%20if%20((tcpt%20!%3D%20'climate')%26%26(tcpt%20!%3D%20'binary_sensor')%26%26(tcpt%20!%3D%20'device_tracker')%26%26(tcpt%20!%3D%20'input_number')%26%26(tcpt%20!%3D%20'sensor')%26%26(tcpt%20!%3D%20'zone')%26%26(tcpt%20!%3D%20'sun'))%7B%0A%20%20%20%20%20%20%20%20return%20'display%3A%20none%3B'%3B%0A%20%20%20%20%20%20%7D%20else%7B%0A%20%20%20%20%20%20%20%20return%20'display%3A'%20%2B%20sxs%20%2B%20'%3Bmargin%3Aauto%3B'%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%20%20%20computeunitStyle%3A%20function%20(hass%2C%20entity_id%2C%20config)%20%7B%0A%20%20%20%20%20%20var%20tid%20%3D%20this.stateObj.entity_id%3B%0A%20%20%20%20%20%20var%20tcpt%20%3D%20tid.split('.')%5B0%5D%3B%0A%20%20%20%20%20%20if%20(tcpt%20%3D%3D%3D%20'sensor')%7B%0A%20%20%20%20%20%20%20%20return%20'margin%3Aauto%3B'%3B%0A%20%20%20%20%20%20%7D%20else%7B%0A%20%20%20%20%20%20%20%20return%20'display%3A%20none%3B'%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%20%20%20%20callService%3A%20function%20(e)%20%7B%0A%20%20%20%20%20%20var%20entity%20%3D%20e.model.entity.entity%3B%0A%20%20%20%20%20%20var%20domain%20%3D%20entity.split('.')%5B0%5D%3B%0A%20%20%20%20%20%20if%20(domain%20%3D%3D%3D%20'script')%20%7B%0A%20%20%20%20%20%20%20%20var%20service%20%3D%20entity.split('.')%5B1%5D%3B%0A%20%20%20%20%20%20%20%20var%20data%20%3D%20e.model.entity.data%20%3F%20(e.model.entity.data)%20%3A%20%7B%7D%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20var%20service%20%3D%20e.model.entity.service%20%3F%20e.model.entity.service.split('.')%5B1%5D%20%3A%20'toggle'%3B%0A%20%20%20%20%20%20%20%20var%20data%20%3D%20e.model.entity.data%20%3F%20(e.model.entity.data)%20%3A%20%7B%20'entity_id'%3A%20entity%20%7D%3B%0A%20%20%20%20%20%20%7D%20%20%20%20%20%20%20%0A%20%20%20%20%20%20this.hass.callService(domain%2Cservice%2Cdata)%3B%0A%20%20%20%20%7D%2C%0A%20%20%20%20stopPropagation(t)%7B%0A%20%20%20%20%20%20t.stopPropagation()%3B%0A%20%20%20%20%7D%2C%0A%20%20%7D)%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttp%3A%2F%2Fxxxxx.f3322.net%3A8084%2Flocal%2Fcustom_ui%2Fstate-card-button.html.js%0A:0:0 Script error.
2018-06-06 12:41:06 ERROR (MainThread) [frontend.js.latest.201805310] http://xxxxx.f3322.net:8084/fron ... f49ac9a0.js:2:12075 Uncaught TypeError: Cannot read property 'state' of undefined
2018-06-06 12:41:06 ERROR (MainThread) [frontend.js.latest.201805310] http://xxxxx.f3322.net:8084/fron ... f49ac9a0.js:2:12075 Uncaught TypeError: Cannot read property 'attributes' of undefined
2018-06-06 12:43:06 ERROR (MainThread) [frontend.js.latest.201805310] http://xxxxx.f3322.net:8084/fron ... f49ac9a0.js:2:12075 Uncaught TypeError: Cannot read property 'state' of undefined
2018-06-06 12:43:06 ERROR (MainThread) [frontend.js.latest.201805310] http://xxxxx.f3322.net:8084/fron ... f49ac9a0.js:2:12075 Uncaught TypeError: Cannot read property 'attributes' of undefined

回复

使用道具 举报

39

主题

1047

帖子

3848

积分

论坛元老

Rank: 8Rank: 8

积分
3848
金钱
2801
HASS币
0
发表于 2018-6-6 15:43:21 | 显示全部楼层
感谢分享
回复

使用道具 举报

23

主题

660

帖子

3108

积分

论坛元老

Rank: 8Rank: 8

积分
3108
金钱
2448
HASS币
10
发表于 2018-6-6 16:16:05 | 显示全部楼层
下载看看
回复

使用道具 举报

3

主题

344

帖子

1598

积分

严重灌水用户

积分
1598
金钱
1254
HASS币
0
发表于 2018-6-6 21:38:50 | 显示全部楼层
谢谢分享
回复

使用道具 举报

2

主题

227

帖子

1862

积分

金牌会员

Rank: 6Rank: 6

积分
1862
金钱
1635
HASS币
0
发表于 2018-6-6 22:06:54 | 显示全部楼层
感谢楼主分享...
回复

使用道具 举报

4

主题

74

帖子

331

积分

中级会员

Rank: 3Rank: 3

积分
331
金钱
257
HASS币
0
发表于 2018-6-7 12:37:01 | 显示全部楼层
初学者 我试试 谢谢大神分享
回复

使用道具 举报

1

主题

120

帖子

643

积分

高级会员

Rank: 4

积分
643
金钱
523
HASS币
0
发表于 2018-6-7 13:07:55 | 显示全部楼层
膜拜大神!!!!!
回复

使用道具 举报

0

主题

113

帖子

679

积分

论坛积极会员

积分
679
金钱
566
HASS币
0
发表于 2018-6-7 13:49:23 | 显示全部楼层
正好需要这个啊,感谢大佬分享
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-4-25 20:25 , Processed in 0.060354 second(s), 30 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表