def miotMode(mode): ''' ''' BLINKER_LOG('need set mode: ', mode) # if mode == BLINKER_CMD_MIOT_READING: # # Your mode function # elif mode == BLINKER_CMD_MIOT_SLEEP: # # Your mode function # elif mode == BLINKER_CMD_MIOT_ALARM: # # Your mode function # elif mode == BLINKER_CMD_MIOT_NIGHT_LIGHT: # # Your mode function # elif mode == BLINKER_CMD_MIOT_ROMANTIC: # # Your mode function # elif mode == BLINKER_CMD_MIOT_READING: # # Your mode function BlinkerMIOT.mode(mode) BlinkerMIOT.print()
def miotQuery(queryCode): ''' ''' BLINKER_LOG('MIOT Query codes: ', queryCode) if queryCode == BLINKER_CMD_QUERY_ALL_NUMBER: BLINKER_LOG('MIOT Query All') BlinkerMIOT.powerState(wsState) BlinkerMIOT.color(getColor()) BlinkerMIOT.mode(wsMode) BlinkerMIOT.colorTemp(50) BlinkerMIOT.brightness(100) BlinkerMIOT.print() elif queryCode == BLINKER_CMD_QUERY_POWERSTATE_NUMBER: BLINKER_LOG('MIOT Query Power State') BlinkerMIOT.powerState(wsState) BlinkerMIOT.print() elif queryCode == BLINKER_CMD_QUERY_COLOR_NUMBER: BLINKER_LOG('MIOT Query Color') BlinkerMIOT.color('red') BlinkerMIOT.print() elif queryCode == BLINKER_CMD_QUERY_MODE_NUMBER: BLINKER_LOG('MIOT Query Mode') BlinkerMIOT.mode(wsMode) BlinkerMIOT.print() elif queryCode == BLINKER_CMD_QUERY_COLORTEMP_NUMBER: BLINKER_LOG('MIOT Query ColorTemperature') BlinkerMIOT.colorTemp(50) BlinkerMIOT.print() elif queryCode == BLINKER_CMD_QUERY_BRIGHTNESS_NUMBER: BLINKER_LOG('MIOT Query Brightness') BlinkerMIOT.brightness(100) BlinkerMIOT.print() else: BlinkerMIOT.powerState(wsState) BlinkerMIOT.color('red') BlinkerMIOT.mode(wsMode) BlinkerMIOT.colorTemp(50) BlinkerMIOT.brightness(100) BlinkerMIOT.print()