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

 找回密码
 立即注册
楼主: wodeming

[已解决] 云米浴霸如何接入home assistant

[复制链接]

9

主题

171

帖子

870

积分

论坛积极会员

积分
870
金钱
699
HASS币
0
发表于 2020-1-14 21:35:24 | 显示全部楼层
大佬,拿到命令后,nodered 里怎么些控制命令?
回复

使用道具 举报

1

主题

14

帖子

117

积分

注册会员

Rank: 2

积分
117
金钱
103
HASS币
0
 楼主| 发表于 2020-1-14 23:20:33 | 显示全部楼层
zjmhlxp 发表于 2020-1-14 21:35
大佬,拿到命令后,nodered 里怎么些控制命令?

1、在节点管理里安装 node-red-contrib-mi-miio
2、添加inject还有“mi 自定义设备” 和“debug”
3、配置好mi自定义设备 IP token
4、inject里选json
{
    "cmd": "miio",
    "method": "你要的方法",
    "value": [
        "属性或属性值"
    ]
}get_prop: 热水器的状态“washStatus”,流速"velocity",当前水温"waterTemp",目标水温"targetTemp",错误码"errStatus",热水余量"hotWater",当前模式"modeType",预约开始时间"appointStart",预约结束时间"appointEnd",热水器清洗提醒"needClean",智能预约"smartAppoint",智能预约详情"smartDetail"
设置水温set_temp 范围[30-75]",
设置模式"set_mode 范围[0,1]", 0是温水模式,1是速热模式
电源开关"set_power 范围[0,1]",
设置智能预约 "set_smart_appoint" 仅限某些型号有这个功能
设置预约模式 "set_appoint [1018022] 1是启用0是分隔符18是起始时间22是结束时间

回复

使用道具 举报

9

主题

171

帖子

870

积分

论坛积极会员

积分
870
金钱
699
HASS币
0
发表于 2020-1-15 10:33:46 | 显示全部楼层
wodeming 发表于 2020-1-14 23:20
1、在节点管理里安装 node-red-contrib-mi-miio
2、添加inject还有“mi 自定义设备” 和“debug”
3、配 ...

大佬太牛了
回复

使用道具 举报

9

主题

171

帖子

870

积分

论坛积极会员

积分
870
金钱
699
HASS币
0
发表于 2020-1-15 18:18:17 | 显示全部楼层
大佬,云米商城APP能发一个吗。我这个云米燃气热水器有些命令不一样。我用Mumu模拟器装不上云米APP
回复

使用道具 举报

1

主题

14

帖子

117

积分

注册会员

Rank: 2

积分
117
金钱
103
HASS币
0
 楼主| 发表于 2020-1-15 22:00:27 | 显示全部楼层
zjmhlxp 发表于 2020-1-15 18:18
大佬,云米商城APP能发一个吗。我这个云米燃气热水器有些命令不一样。我用Mumu模拟器装不上云米APP ...

你试一下这个版本吧 https://www.xzking.com/html/136697.html
回复

使用道具 举报

9

主题

171

帖子

870

积分

论坛积极会员

积分
870
金钱
699
HASS币
0
发表于 2020-1-18 11:07:59 | 显示全部楼层
本帖最后由 zjmhlxp 于 2020-1-18 11:39 编辑

__d(function(e,t,a,i,n){Object.defineProperty(i,"__esModule",{value:!0});var o=t(n[0]),l=babelHelpers.interopRequireDefault(o),s=t(n[1]),r=t(n[2]),u=babelHelpers.interopRequireDefault(r),c=t(n[3]),f=babelHelpers.interopRequireDefault(c),d=t(n[4]),m=babelHelpers.interopRequireDefault(d),p=t(n[5]),h=babelHelpers.interopRequireDefault(p),g=t(n[6]),T=babelHelpers.interopRequireDefault(g),y=t(n[7]),w=babelHelpers.interopRequireDefault(y),b=t(n[8]),v=babelHelpers.interopRequireDefault(b),C=t(n[9]),S=(t(n[10]),t(n[11])),E=t(n[12]),I=t(n[13]),k=t(n[14]),x=k.ratio,D=k.lang,V=k.screenWidth,H=k.screenHeight,O=parseInt(560*x),A=parseInt(530*x),M=k.model.isElectric,_=parseInt(80*x),P='en'===k.lang.language?parseInt(230*x):parseInt(200*x),R=k.getAuthFile(),F=!1,q=(function(e){function a(e,t){babelHelpers.classCallCheck(this,a);var i=babelHelpers.possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,e,t));return k.indexComponent=i,i.state=babelHelpers.extends({},C.DeviceModel.state,{init:!1,slideTitle:''}),i.tempScope=[],i.canReadState=!1,i}return babelHelpers.inherits(a,e),babelHelpers.createClass(a,[{key:"doNavigate",value:function(e,t){var a=this;setTimeout(function(){a.props.navigation.navigate(e,t)})}},{key:"getModeData",value:function(){var e=void 0;if(M){e=[];(k.model.isDoubleTank?D.heatModeArr.elecModeText).forEach(function(t,a){e.push({text:t,value:a})})}else e=[{text.p3,value:39},{text.p1,value:40},{text.p2,value:42},{text.p4,value:36}];return e}},{key:"getTempScope",value:function(){var e=[],t=void 0;t=M?k.model.isDoubleTank&&1===this.state.heatMode?80:75:65;for(var a=30;a<=t;a++)e.push({text:a,value:a});return(1===this.state.modeType||k.model.isDoubleTank)&&e.push({text:k.lang.tempControlgerm,value:k.lang.tempControlgerm}),e}},{key:"componentDidMount",value:function(){var e=this;k.showLicense(k.licenseKey,R),k.initEvent(this,k.licenseKey),this._didFocusListener=this.props.navigation.addListener('didFocus',function(t){k.currentPage=t.state.routeName,e.canReadState=!0,e.readState(),e.delayCloudInter=setTimeout(function(){'MainPage'===t.state.routeName&&e.refs.CloudContainer.goon()},1e3)}),this._willBlurListener=this.props.navigation.addListener('willBlur',function(t){e.canReadState=!1,clearTimeout(e.delayCloudInter),e.refs.CloudContainer.pause()})}},{key:"componentWillUnmount",value:function(){this._didFocusListener.remove(),this._deviceNameChangedListener.remove(),this._authListener.remove(),this._willBlurListener.remove()}},{key:"componentWillMount",value:function(){}},{key:"reqData",value:function(e,t,a,i,n){var o=this;k.fetchMethod(e,t,function(t){if(0===t.code)'get_prop'!==e&&(clearTimeout(o.inter),readStateKey=null,o.isReadingState=!0,o.inter=setTimeout(function(){o.isReadingState=!1,o.readState()},1e3)),a(t.result);else{if('get_prop'===e&&-2===t.code)return o.isOffline=!0,k.toggleOfflineView(!0),i&&i(t),void o.dealProp({washStatus:0,velocity:0, :0,targetTemp:null,errStatus:0,hotWater:null,modeType:null,appointStart:null,appointEnd:null,needClean:0});i?i(t):k.toast(JSON.stringify(t))}},null,n)}},{key:"readState",value:function(){var e=this;if(!this.isReadingState&&this.canReadState){clearTimeout(this.inter),this.isReadingState=!0;var t=k.getUUID();readStateKey=t;var a=["washStatus","velocity","waterTemp","targetTemp","errStatus"];M&&(a=a.concat(["hotWater","needClean"]),a=k.model.isDoubleTank?a.concat(["rodUse","rodLife","singleHeat","heatMode","appoint1","appoint2",'yiJun']):a.concat(["modeType","appointStart","appointEnd"])),k.model.isE2?a=a.concat(["smartAppoint"]):k.model.isZeroCold&&(a=a.concat(["preHeatTime1",'preHeatTime2','isPreHeatNow']),k.model.hasAppApoint&&a.push("preHeatTime3")),null===this.state.init&&this.setState({init:!1}),this.reqData("get_prop",a,function(i){if(t===readStateKey){for(var n={init:!0},o=0;o<a.length;o++){n[a[o]]=i[o]}console.log('\u5c5e\u6027=---------------'),console.log(n),M&&(1!==n.needClean||F||(F=!0,k.confirm(k.lang.cleanTip,k.lang.cleanDetail,function(t){t.hide(),e.reqData("reset_use_time",[0],function(){},function(e){})},null,k.lang.nextRemind,k.lang.cleaned))),e.isReadingState=!1,e.dealProp(n),e.isOffline=!1,k.toggleOfflineView(!1),e.inter=setTimeout(function(){e.readState()},3e3)}},function(a){t===readStateKey&&(!1===e.state.init&&e.setState({init:null}),e.isReadingState=!1,e.inter=setTimeout(function(){e.readState()},3e3))},!1)}}},{key:"dealProp",value:function(e){var t=this;e.waterTemp>100&&(e.waterTemp=this.state.waterTemp,M&&(e.hotWater=this.state.hotWater)),this.refs.MainPageError.deal(e.errStatus,e.rodUse),k.model.isE2?(this.smartAppoint=e.smartAppoint,delete e.smartAppoint):k.model.isZeroCold?0===e.isPreHeatNow||1===e.isPreHeatNow?this.refs.oneKeyHotSwitch.setValue(1===e.isPreHeatNow):this.refs.oneKeyHotSwitch.setValue(3===e.washStatus):k.model.isDoubleTank&&(this.refs.singleHeatSwitch.setValue(0!==e.singleHeat),["rodUse","rodLife",'rodUse'].forEach(function(a){t[a]=e[a],delete e[a]})),M&&k.isUnValidValue(e.hotWater)&&(e.hotWater='--'),this.refs.CloudContainer.deal(e.washStatus,e.waterTemp),M&&this.refs.elecSwitch.setValue(0!==e.washStatus),k.setState(this,e)}},{key:"setTemp",value:function(e){var t=this,a=e.value;if(a===k.lang.tempControlgerm){if(k.model.isDoubleTank&&1===this.state.yiJun||!k.model.isDoubleTank&&M&&80===this.state.targetTemp)return;k.confirm(k.lang.tempControlgerm,k.lang.germTip,function(e){e&&e.hide(),k.model.isDoubleTank?t.reqData("set_yi_jun",[1],function(){k.toast(D.setSuccess)},function(e){k.toast(D.setFail)}):t.reqData("set_temp",[80],function(){k.toast(D.setSuccess)},function(e){k.toast(D.setFail)})})}else k.model.isDoubleTank&&1===this.state.yiJun?this.reqData("set_yi_jun",[0],function(){t.reqData("set_temp",[a],function(){k.toast(D.setSuccess)},function(e){k.toast(D.setFail)})},function(e){k.toast(D.setFail)}):this.reqData("set_temp",[a],function(e){k.toast(D.setSuccess)},function(e){k.toast(D.setFail)})}},{key:"setMode",value:function(e){var t=this,a=e.value;if(M)if(2===a){var i=[1,this.state.appointStart||0,this.state.appointEnd||0];this.reqData("set_appoint",i,function(){k.toast(D.setSuccess)},function(e){k.toast(D.setFail)})}else{var n=this.state.heatMode;this.reqData(k.model.isDoubleTank?"set_heat_mode":"set_mode",[a],function(){0!==a||45===t.state.targetTemp||k.model.isDoubleTank?k.model.isDoubleTank&&t.state.targetTemp>75&&1===n&&0===a?t.reqData("set_temp",[75],function(){k.toast(D.setSuccess)},function(e){k.toast(D.setFail)}):k.toast(D.setSuccess):t.reqData("set_temp",[45],function(){k.toast(D.setSuccess)},function(e){k.toast(D.setFail)})},function(e){k.toast(D.setFail)})}else this.setTemp(e)}},{key:"showModeSlide",value:function(){if(!(this.isOffline||this.state.velocity||this.isVelocityOrClose||!this.state.init||k.model.isDoubleTank&&1===this.state.yiJun)){var e=void 0;e=M?k.model.isDoubleTank?this.state.heatMode:this.state.modeType:this.state.targetTemp;var t=this.refs.modeSlidePicker;t.setValue(e),t.show()}}},{key:"showTempSlide",value:function(e,t){if(t)k.alert(k.lang.confirmMes,k.lang.tempMes);else if(!this.isOffline&&!e&&this.state.init){var a=this.getTempScope(),i=!1,n=null;M&&(k.model.isDoubleTank?1===this.state.yiJun&&(n=k.lang.tempControlgerm,i=!0):80===this.state.targetTemp&&(i=!0,1===this.state.modeType&&(n=k.lang.tempControlgerm))),i||(n=this.state.targetTemp);var o=this.refs.tempSlidePicker;o.updateData(a,function(){o.setValue(n)}),o.show()}}},{key:"togglePower",value:function(e){var t=this;if(this.settingPower||!this.state.init||this.isOffline)return!1;if(this.state.velocity>0)return k.toast(D.usingWater),!1;var a=function(a){a&&a.hide(),t.settingPower=!0,M?t.refs.elecSwitch.disable():t.setState({opering:e?1:2}),t.reqData("set_power",[e?1:0],function(){M?(t.refs.elecSwitch.enable(),t.refs.elecSwitch.setValue(!!e)):t.setState({opering:0}),e&&(M||t.refs.RotatingCircle.stop()),t.settingPower=!1},function(a){console.log('\u5931\u8d25'),M?t.refs.elecSwitch.enable():t.setState({opering:0}),e&&(M||t.refs.RotatingCircle.stop()),t.settingPower=!1,k.toast(e?D.openFail.closeFail)})};return e?(M||this.refs.RotatingCircle.start(),a()):k.confirm(k.lang.confirmMes,k.lang.sureClose,a),!1}},{key:"toggleMask",value:function(e){this.refs.mask.setNativeProps({style:e?{left:0,top:0}:{left:-9999,top:-9999}}),e?this.refs.CloudContainer.pause():this.refs.CloudContainer.goon()}},{key:"isBooked",value:function(e,t,a){var i=void 0,n=void 0,o=void 0;return e&&(i='1'===e.split("-")[0]),t&&(n='1'===t.split("-")[0]),a&&(o='1'===a.split("-")[0]),i||n||o}},{key:"toggle",value:function(e,t,a){if(!k.model.isDoubleTank||1!==this.state.yiJun||'singleHeatSwitch'!==e){if('oneKeyHotSwitch'===e&&a&&3===this.state.washStatus)return k.alert(k.lang.confirmMes,k.lang.notOpenOneKey);var i=this.refs[e];i.disable(),this.reqData(t,[a?1:0],function(){i.enable(),k.toast(D.setSuccess),i.setValue(a)},function(e){i.enable(),k.toast(D.setFail)})}}},{key:"render",value:function(){var e=this,a=void 0,i='',o='',r=0===this.state.washStatus,u=this.state.velocity||r,c=M&&0===this.state.modeType&&!k.model.isDoubleTank,d=u||c,p=!1;if(M)if(a=this.state.velocity?D.usingWater:80===this.state.targetTemp&&!k.model.isDoubleTank||k.model.isDoubleTank&&1===this.state.yiJun?D.tempControlgerm.elecStatus[this.state.washStatus],k.model.isDoubleTank){var g=this.isBooked(this.state.appoint1,this.state.appoint2);0!==this.state.singleHeat||g||(d=!0,p=!0),i=D.heatModeArr[this.state.heatMode],o=g?D.booked.unbook}else i=D.elecModeText[this.state.modeType].replace("\n"," "),k.isUnValidValue(this.state.appointStart)||k.isUnValidValue(this.state.appointEnd)||(o=k.paddingZero(this.state.appointStart,2)+":00 ~ "+k.paddingZero(this.state.appointEnd,2)+":00");else i=k.isInitValue(this.state.targetTemp)?'':k.getGasMode(this.state.targetTemp),k.model.isZeroCold&&(u=2===this.state.washStatus||r,o=this.isBooked(this.state.preHeatTime1,this.state.preHeatTime2,this.state.preHeatTime3)?D.booked.unbook);var y=null;if(M){var b=void 0;b=k.model.isDoubleTank?!u:!u&&2===this.state.modeType,y=l.default.createElement(s.TouchableOpacity,{activeOpacity:.6,style:U.infoItem,onPress:function(){if(!u&&!e.isOffline)if(k.model.isDoubleTank)e.doNavigate('AppointUseWater',{appoint1:e.state.appoint1,appoint2:e.state.appoint2});else{if(2!==e.state.modeType)return;e.doNavigate('ChooseHeatTime',{startTime:e.state.appointStart,endTime:e.state.appointEnd,smartAppoint:e.smartAppoint})}}},l.default.createElement(s.View,{style:[U.infoItemContent,{opacity:b?1:.5}]},l.default.createElement(s.Text,{style:U.infoTitle},k.model.isDoubleTank?D.bookWater.useWaterTime)),l.default.createElement(s.View,{style:[U.infoItemTip,{opacity:b?1:.5}]},l.default.createElement(s.Text,{style:U.infoTip},o)),l.default.createElement(s.View,{style:U.infoItemArrow},l.default.createElement(s.Image,{style:U.infoItemArrowImg,source:t(n[15])})))}else k.model.isZeroCold?(3===this.state.washStatus&&(a=k.lang.preHeating),y=l.default.createElement(s.TouchableOpacity,{activeOpacity:.6,style:U.infoItem,onPress:function(){2===e.state.washStatus||e.isOffline||!e.state.preHeatTime1||u||e.doNavigate('AppointUseWater',{appoint1:e.state.preHeatTime1,appoint2:e.state.preHeatTime2,appoint3:e.state.preHeatTime3})}},l.default.createElement(s.View,{style:[U.infoItemContent,{opacity:2===this.state.washStatus||u?.5:1}]},l.default.createElement(s.Text,{style:U.infoTitle},D.zeroColdBookWater)),l.default.createElement(s.View,{style:[U.infoItemTip,{opacity:2===this.state.washStatus||u?.5:1}]},l.default.createElement(s.Text,{style:U.infoTip},o)),l.default.createElement(s.View,{style:U.infoItemArrow},l.default.createElement(s.Image,{style:U.infoItemArrowImg,source:t(n[15])})))):y=l.default.createElement(s.TouchableOpacity,{activeOpacity:.6,style:U.infoItem,onPress:function(){e.doNavigate('UseReport',{})}},l.default.createElement(s.View,{style:U.infoItemContent},l.default.createElement(s.Text,{style:U.infoTitle},D.useReport)),l.default.createElement(s.View,{style:U.infoItemTip},l.default.createElement(s.Text,{style:U.infoTip},D.detail)),l.default.createElement(s.View,{style:U.infoItemArrow},l.default.createElement(s.Image,{style:U.infoItemArrowImg,source:t(n[15])})));var v=M?this.state.hotWater:this.state.waterTemp,C=k.isInitValue(v);this.isVelocityOrClose=u;var S='en'===k.lang.language;return l.default.createElement(s.View,{style:[U.container,{paddingBottom:0}]},(k.model.isZeroCold&&3===this.state.washStatus||M)&&this.state.init?l.default.createElement(s.View,{style:U.status},l.default.createElement(s.View,{style:U.statusInner},l.default.createElement(s.Text,{style:U.statusText},a))):null,l.default.createElement(s.View,{style:U.center},l.default.createElement(m.default,{size:A,temp:this.state.waterTemp,ref:'CloudContainer'}),this.state.init?l.default.createElement(s.View,{style:U.centerTextCon},M?l.default.createElement(s.Text,{style:[U.centerLabel,S?{fontSize:10}:null]},k.lang.leftWater):null,l.default.createElement(s.View,null,l.default.createElement(s.Text,{style:[U.centerTemp,C?{fontSize:80*x}:{}]},v),C?null:l.default.createElement(s.Text,{style:[U.centerUnit,M?{bottom:30*x}:{topI.isYunmi?46:15)*x}]},M?'%':'\u2103')),M?l.default.createElement(s.View,{style:{flexDirection:"row",justifyContent:'center',alignItems:'center'}},l.default.createElement(s.Text,{style:U.centerBottomVal},this.state.waterTemp),l.default.createElement(s.Text,{style:U.centerBottomUnit},"\u2103")):null):l.default.createElement(s.View,null,l.default.createElement(s.Text,{style:U.centerInitText},this.state.init?'':null===this.state.init?D.loadfail:D.loading))),this.state.velocity?l.default.createElement(s.Text,{style:U.velocityText},D.curVelocity," ",this.state.velocity,"L/min"):null,l.default.createElement(h.default,{ref:'MainPageError',navigation:this.props.navigation}),l.default.createElement(s.View,{style:U.info},M?l.default.createElement(s.View,{style:[U.infoItem,{opacity:this.state.velocity?.5:1}]},l.default.createElement(s.View,{style:U.infoItemContent},l.default.createElement(s.Text,{style:U.infoTitle},D.togglePower)),l.default.createElement(s.View,null,l.default.createElement(f.default,{ref:"elecSwitch",openText:"",closeText:"",openTumbColor:"#50C7FF",onBeforeChange:function(t){return e.togglePower(!t),!1}}))):null,k.model.isZeroCold?l.default.createElement(s.View,{style:[U.infoItem,{opacity:u||this.state.velocity&&3!==this.state.washStatus||0===this.state.isPreHeatNow&&3===this.state.washStatus?.5:1}]},l.default.createElement(s.View,{style:U.infoItemContent},l.default.createElement(s.Text,{style:U.infoTitle},D.oneKeyHot)),l.default.createElement(s.View,null,l.default.createElement(f.default,{ref:"oneKeyHotSwitch",size:22,openText:"",closeText:"",openTumbColor:"#50C7FF",onBeforeChange:function(t){return!(u||e.isOffline||e.state.velocity&&3!==e.state.washStatus)&&(e.toggle('oneKeyHotSwitch','set_preheat_now',!t),!1)}}))):null,l.default.createElement(s.TouchableOpacity,{activeOpacity:.6,onPress:this.showModeSlide.bind(this),style:U.infoItem},l.default.createElement(s.View,{style:[U.infoItemContent,{opacity:u||this.state.velocity||k.model.isDoubleTank&&1===this.state.yiJun?.5:1}]},l.default.createElement(s.Text,{style:U.infoTitle},k.model.isDoubleTank?D.heatMode:D.curMode)),l.default.createElement(s.View,{style:U.infoItemTip},l.default.createElement(s.Text,{style:U.infoTip},i)),l.default.createElement(s.View,{style:U.infoItemArrow},l.default.createElement(s.Image,{style:U.infoItemArrowImg,source:t(n[15])}))),k.model.isDoubleTank?l.default.createElement(s.View,{style:[U.infoItem,{opacity:u?.5:1}]},l.default.createElement(s.View,{style:U.infoItemContent},l.default.createElement(s.Text,{style:U.infoTitle},D.singleHeat)),l.default.createElement(s.View,null,l.default.createElement(f.default,{ref:"singleHeatSwitch",openText:"",closeText:"",openTumbColor:"#50C7FF",onBeforeChange:function(t){return!u&&!e.isOffline&&(e.toggle('singleHeatSwitch','set_single_heat',!t),!1)}}))):null,l.default.createElement(s.TouchableOpacity,{activeOpacity:.6,style:U.infoItem,onPress:this.showTempSlide.bind(this,d,p)},l.default.createElement(s.View,{style:[U.infoItemContent,{opacity:d?.5:1}]},l.default.createElement(s.Text,{style:U.infoTitle},D.targetTemp)),l.default.createElement(s.View,{style:U.infoItemTip},l.default.createElement(s.Text,{numberOfLines:1,style:[U.infoTemp,{width:200*x,color:d?'rgb(196,196,196)':k.getTempColor(this.state.targetTemp)}]},80===this.state.targetTemp&&!k.model.isDoubleTank||k.model.isDoubleTank&&1===this.state.yiJun?k.lang.tempControlgerm:this.state.targetTemp)),l.default.createElement(s.View,{style:U.infoItemArrow},l.default.createElement(s.Image,{style:U.infoItemArrowImg,source:t(n[15])}))),y),M?null:l.default.createElement(s.View,{style:[U.oper,{height:0===this.state.washStatus?198*x:148*x}]},l.default.createElement(s.TouchableOpacity,{activeOpacity:.6,style:U.operBtn,onPress:this.togglePower.bind(this,this.state.washStatus>0?0:1)},l.default.createElement(s.View,{style:{alignItems:'center',justifyContent:'center',width:_+6,paddingTop:3},ref:'openBtn'},l.default.createElement(s.Image,{style:U.operImg,source:0===this.state.washStatus?t(n[16]):t(n[17])}),l.default.createElement(w.default,{ref:'RotatingCircle',targetSize:_,borderSize:3,bgColor:'rgb(250,250,250)',borderColor:"#9bd6ff"})),0===this.state.washStatus?l.default.createElement(s.Text,{style:U.operText},D.open):null)),!M&&this.state.opering?l.default.createElement(s.View,{style:[U.operTip,{bottom:0===this.state.washStatus?198*x-10:148*x-10}]},l.default.createElement(s.Text,{style:U.operTipText},1===this.state.opering?k.lang.opening:k.lang.closing)):null,l.default.createElement(T.default,{displayItemNum:'en'===k.lang.language||M?3:5,title:D.chooseMode,ref:'modeSlidePicker',onOpen:function(){clearTimeout(e.delayCloudInter),e.refs.CloudContainer.pause()},onChoose:this.setMode.bind(this),onClose:function(){clearTimeout(e.delayCloudInter),e.refs.CloudContainer.goon()},data:this.getModeData(),itemHeight:'en'===k.lang.language?160*k.factor:null}),l.default.createElement(T.default,{title:D.targetTemp,ref:'tempSlidePicker',onOpen:function(){clearTimeout(e.delayCloudInter),e.refs.CloudContainer.pause()},onChoose:this.setTemp.bind(this),onClose:function(){clearTimeout(e.delayCloudInter),e.refs.CloudContainer.goon()},data:this.tempScope}))}}]),a})(o.Component);q.navigationOptions=function(e){var t=e.navigation;return{header:l.default.createElement(v.default,{title:t.state.params?t.state.params.name:E.deviceName,style:{backgroundColor:"#fff"},onPressLeft:function(){E.exit()},onPressRight:function(){var e=k.model.isE2||k.model.isDoubleTank||k.model.isZeroCold?l.default.createElement(u.default,{navigation:t}):null;k.indexComponent.doNavigate('SettingPage',{featureView:e,showAuto:C.DeviceModel.supportedIntelligentScene(),isBluetooth:!1,showMiLicense:!I.isYunmi&&!E.isShared,licenseUrl:R.licenseUrl,privateUrl:R.privateUrl,showShare:!0,showUpdate:C.DeviceModel.supportedOTA(),url:C.DeviceModel.supportedFAQ()?E.FAQUrl():k.baseIotUri+"faq.html#/"+k.getFaqModel()+"/zh-Hans/catalog",version:C.Version})}})}},i.default=q;var U=s.StyleSheet.create({mask:{position:'absolute',left:-9999,top:-9999,width:V,height:H},container:{flex:1,backgroundColor:"#fff",flexDirection:'column'},status:{alignItems:'center',justifyContent:'center'},statusInner:{borderColor:"#EDEDED",borderWidth:1,borderRadius:42*x,paddingHorizontal:30*x,paddingVertical:10*x},statusText:{color:"#858585",textAlign:'center'},center:{height:O,alignItems:'center',justifyContent:'center'},centerTextCon:{paddingHorizontal:40*x},centerLabel:{color:"#27766C",backgroundColor:'transparent',textAlign:'center'},centerTemp:S.fontOfYS({textAlign:'center',fontSizeM?150:160)*x,color:"#fff",backgroundColor:"transparent"}),centerInitText:S.fontOfYS({textAlign:'center',color:"#fff",fontSize:32*x,backgroundColor:"transparent"}),centerUnit:S.fontOfYS({color:"#fff",position:'absolute',backgroundColor:"transparent",fontSize:40*x,right:-40*x}),centerBottomVal:{color:"#fff",backgroundColor:'transparent',fontSize:36*x},centerBottomUnit:{color:"#fff",backgroundColor:'transparent',fontSize:26*x},animation:{position:'absolute',width:A,height:A,borderWidth:0,borderColor:'#ccc',leftV-A)/2,topO-A)/2},velocityText:{color:"#BBB",backgroundColor:'transparent',textAlign:'center',marginBottom:16*x},oper:{borderTopWidth:1,borderTopColor:'rgb(224,224,224)',backgroundColor:'rgb(250,250,250)',alignItems:'center',justifyContent:'center'},operBtn:{padding:3,alignItems:'center',justifyContent:'center'},operImg:{width:_,height:_},operIng:{position:'absolute',left:0,top:0,width:_,height:_},operTip:{width,position:'absolute',paddingVertical:16*x,leftV-P)/2,backgroundColor:"rgba(221,221,221,.8)",borderRadius:36*x},operTipText:{textAlign:'center',backgroundColor:'transparent'},operText:{color:'rgb(127,127,127)',textAlign:'center',marginTop:16*x},info:{flex:1,flexDirection:'column',justifyContent:'center',paddingVertical:26*k.yFactor},infoItem:{flexDirection:'row',flex:1,paddingHorizontal:80*x,alignItems:'center',justifyContent:'center'},infoItemContent:{flex:1,justifyContent:'center'},infoTitle:{color:'rgb(122,122,122)',fontSize:15},infoItemTip:{paddingRight:28*x,justifyContent:'center'},infoTip:{color:'rgb(196,196,196)'},infoTemp:{textAlign:'right'},infoItemArrow:{justifyContent:'center'},infoItemArrowImg:{width:12*x,height:19*x}})},678,[101,14,679,680,693,764,765,768,769,681,201,771,659,12,685,772,773,774]);

大佬给看看,这是我APP里抄写出来的。一键即热命令要怎么写
(e.toggle('oneKeyHotSwitch','set_preheat_now',!t)
里面有看到这两个,开起一键即热后,自动开起热水循环,半小时的。
试了好几个命令了。还是
node red 输出:Error: Call to device timed out
回复

使用道具 举报

1

主题

14

帖子

117

积分

注册会员

Rank: 2

积分
117
金钱
103
HASS币
0
 楼主| 发表于 2020-1-19 08:04:19 来自手机 | 显示全部楼层
这个错误提示可能是因为没有连接到设备,检查一下ip和token对不对
回复

使用道具 举报

1

主题

14

帖子

117

积分

注册会员

Rank: 2

积分
117
金钱
103
HASS币
0
 楼主| 发表于 2020-1-19 08:10:22 来自手机 | 显示全部楼层
你把整个文件上来吧
回复

使用道具 举报

2

主题

37

帖子

381

积分

中级会员

Rank: 3Rank: 3

积分
381
金钱
344
HASS币
0
发表于 2020-2-6 15:00:25 来自手机 | 显示全部楼层
顶一下 期待大佬研究出插件
回复

使用道具 举报

0

主题

69

帖子

258

积分

中级会员

Rank: 3Rank: 3

积分
258
金钱
189
HASS币
0
发表于 2020-4-1 21:26:06 | 显示全部楼层
小白  期待成品    感谢
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-24 13:43 , Processed in 0.112142 second(s), 29 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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