Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@tmarquespt
Created April 24, 2019 21:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmarquespt/ebf1c7cb02f9621cd2c8dad52066af66 to your computer and use it in GitHub Desktop.
Save tmarquespt/ebf1c7cb02f9621cd2c8dad52066af66 to your computer and use it in GitHub Desktop.
[{"id":"46eb06a6.81a7f8","type":"tab","label":"Flow 12","disabled":false,"info":""},{"id":"3f85cbef.bafab4","type":"comment","z":"46eb06a6.81a7f8","name":"z2m Allow Join","info":"","x":120,"y":200,"wires":[]},{"id":"a8167da3.49022","type":"trigger-state","z":"46eb06a6.81a7f8","name":"on/off","server":"2998c139.aa476e","entityid":"input_boolean.z2mjoin","entityidfiltertype":"exact","debugenabled":false,"constraints":[],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"habool","x":90,"y":300,"wires":[["c585d6a1.0fe438"],[]]},{"id":"6fa895f1.07281c","type":"mqtt out","z":"46eb06a6.81a7f8","name":"z2m Allow Join","topic":"zigbee2mqtt/bridge/config/permit_join","qos":"2","retain":"","broker":"1400d847.d95a08","x":840,"y":300,"wires":[]},{"id":"91c758ad.61df18","type":"change","z":"46eb06a6.81a7f8","name":"True","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":260,"wires":[["6fa895f1.07281c","4dc634d3.b0672c","9c48bd70.d00b6"]]},{"id":"42871f5.8b5efe","type":"change","z":"46eb06a6.81a7f8","name":"False","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":320,"wires":[["6fa895f1.07281c","539ce725.0ea438"]]},{"id":"c585d6a1.0fe438","type":"switch","z":"46eb06a6.81a7f8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"true","vt":"str"},{"t":"cont","v":"false","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":230,"y":300,"wires":[["91c758ad.61df18"],["42871f5.8b5efe"]]},{"id":"539ce725.0ea438","type":"api-call-service","z":"46eb06a6.81a7f8","name":"Off","server":"2998c139.aa476e","service_domain":"input_boolean","service":"turn_off","data":"{\"entity_id\":\"input_boolean.z2mjoin\"}","mergecontext":"","output_location":"","output_location_type":"none","x":690,"y":360,"wires":[["7ae6f2d7.ed57ec"]]},{"id":"fb5614da.a38668","type":"trigger-state","z":"46eb06a6.81a7f8","name":"valor_minutos","server":"2998c139.aa476e","entityid":"input_number.z2mtime","entityidfiltertype":"exact","debugenabled":false,"constraints":[],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"num","x":120,"y":380,"wires":[["69b8b19d.7b0cb","a9961af0.886148"],[]]},{"id":"212abd75.9d3ec2","type":"api-call-service","z":"46eb06a6.81a7f8","name":"","server":"2998c139.aa476e","service_domain":"timer","service":"start","data":"{\"entity_id\":\"timer.z2mjtimer\"}","mergecontext":"","output_location":"","output_location_type":"none","x":720,"y":240,"wires":[[]]},{"id":"7ae6f2d7.ed57ec","type":"api-call-service","z":"46eb06a6.81a7f8","name":"tim_off","server":"2998c139.aa476e","service_domain":"timer","service":"cancel","data":"{\"entity_id\":\"timer.z2mjtimer\"}","mergecontext":"","output_location":"","output_location_type":"none","x":810,"y":360,"wires":[[]]},{"id":"eacb0162.23fb7","type":"delay","z":"46eb06a6.81a7f8","name":"","pauseType":"delayv","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":640,"y":300,"wires":[["539ce725.0ea438"]]},{"id":"4d0181bb.0b72c","type":"change","z":"46eb06a6.81a7f8","name":"delay","rules":[{"t":"set","p":"delayms","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":360,"wires":[[]]},{"id":"69b8b19d.7b0cb","type":"function","z":"46eb06a6.81a7f8","name":"to_ms","func":"msg.payload = msg.payload * 60000\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":360,"wires":[["4d0181bb.0b72c"]]},{"id":"4dc634d3.b0672c","type":"change","z":"46eb06a6.81a7f8","name":"delay","rules":[{"t":"set","p":"delay","pt":"msg","to":"delayms","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":300,"wires":[["eacb0162.23fb7"]]},{"id":"9c48bd70.d00b6","type":"template","z":"46eb06a6.81a7f8","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{ \"data\": { \"duration\": \"00:{{flow.delay}}:00\" } }\n","output":"str","x":560,"y":240,"wires":[["212abd75.9d3ec2"]]},{"id":"a9961af0.886148","type":"change","z":"46eb06a6.81a7f8","name":"delay","rules":[{"t":"set","p":"delay","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":400,"wires":[[]]},{"id":"44f8fee3.078e4","type":"trigger-state","z":"46eb06a6.81a7f8","name":"LogLevel","server":"2998c139.aa476e","entityid":"input_select.z2m_loglevel","entityidfiltertype":"exact","debugenabled":false,"constraints":[],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":100,"y":520,"wires":[["461a05a0.efb60c"],[]]},{"id":"d2f8587f.5a9d38","type":"comment","z":"46eb06a6.81a7f8","name":"z2m LogLevel","info":"","x":110,"y":460,"wires":[]},{"id":"461a05a0.efb60c","type":"mqtt out","z":"46eb06a6.81a7f8","name":"z2m ChangeLog","topic":"zigbee2mqtt/bridge/config/log_level","qos":"2","retain":"","broker":"1400d847.d95a08","x":320,"y":520,"wires":[]},{"id":"2998c139.aa476e","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":true,"rejectUnauthorizedCerts":true},{"id":"1400d847.d95a08","type":"mqtt-broker","z":"","name":"MQTT","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"domoticz/bridge/state","birthQos":"0","birthPayload":"online","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment