Just wanted to say THANKYOU for this integration. Amazing community here.
This enabled me to setup an automation to give control of internet time back to my child.
They can start and Pause here internet time via the UI.
My wife and I can also easily add and remove time via Home Assistant.
NodeRed Flow
[{"id":"bb09d6cac70a7390","type":"tab","label":"Internet timer","disabled":false,"info":"","env":[]},{"id":"76dc725016655d9f","type":"group","z":"bb09d6cac70a7390","name":"Manage Internet Access","style":{"label":true},"nodes":["9628e7936e76690d","c162428e7ecb5caa","9263895f5aad46ae","db99c983b054ec7f","b1d9bed5b650cbed","de0f5ce631c64f33","0739c62cd967450d"],"x":1454,"y":159,"w":652,"h":202},{"id":"3f7fb84d0529290f","type":"junction","z":"bb09d6cac70a7390","x":1180,"y":760,"wires":[[]]},{"id":"9628e7936e76690d","type":"junction","z":"bb09d6cac70a7390","g":"76dc725016655d9f","x":1480,"y":280,"wires":[["9263895f5aad46ae"]]},{"id":"76795b741ffe10c8","type":"ui_gauge","z":"bb09d6cac70a7390","name":"Minutes Remaining Guage","group":"c50fec45.1c008","order":0,"width":0,"height":0,"gtype":"gage","title":"Minutes Remaining","label":"Minutes","format":"{{value}}","min":0,"max":"60","colors":["#ff0000","#e6e600","#00ff80"],"seg1":"","seg2":"","diff":false,"className":"","x":2120,"y":700,"wires":[]},{"id":"e4ada3ae82eea590","type":"function","z":"bb09d6cac70a7390","name":"Increment by 10","func":"msg.increment = 10;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1480,"y":700,"wires":[["3fa3fd799207d51b"]]},{"id":"652d84d963dc81b2","type":"function","z":"bb09d6cac70a7390","name":"Reset","func":"msg.reset = true;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1450,"y":640,"wires":[["3fa3fd799207d51b"]]},{"id":"f8e21aae820ece4a","type":"function","z":"bb09d6cac70a7390","name":"Decrement by 1","func":"msg.decrement = 1;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1480,"y":520,"wires":[["3fa3fd799207d51b"]]},{"id":"3fa3fd799207d51b","type":"counter","z":"bb09d6cac70a7390","name":"","init":"60","step":1,"lower":"0","upper":"240","mode":"increment","outputs":"1","x":1660,"y":640,"wires":[["68d997c11064a865"]]},{"id":"68d997c11064a865","type":"function","z":"bb09d6cac70a7390","name":"count value","func":"msg.payload = msg.count;\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1830,"y":640,"wires":[["76795b741ffe10c8","e63f7184.19c09","cdbf15a40b8ccdb8"]]},{"id":"760ed32d1a2f6f20","type":"change","z":"bb09d6cac70a7390","name":"Block","rules":[{"t":"set","p":"payload","pt":"msg","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1130,"y":460,"wires":[["a7873f2f6567ebf1","95b043ab72270f43"]]},{"id":"a7873f2f6567ebf1","type":"traffic","z":"bb09d6cac70a7390","name":"Traffic Light","property_allow":"payload","filter_allow":"on","ignore_case_allow":false,"negate_allow":false,"send_allow":false,"property_stop":"payload","filter_stop":"off","ignore_case_stop":false,"negate_stop":false,"send_stop":false,"default_start":true,"differ":false,"x":1290,"y":520,"wires":[["f8e21aae820ece4a"]]},{"id":"8940809f7eeb8a74","type":"change","z":"bb09d6cac70a7390","name":"Allow","rules":[{"t":"set","p":"payload","pt":"msg","to":"on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1130,"y":420,"wires":[["a7873f2f6567ebf1","9628e7936e76690d"]]},{"id":"e63f7184.19c09","type":"switch","z":"bb09d6cac70a7390","name":"ON or OFF ?","property":"payload","propertyType":"msg","rules":[{"t":"lte","v":"0","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":2010,"y":460,"wires":[["289ed11e.d7612e"],["7c1c26d9.83e3d8"]]},{"id":"289ed11e.d7612e","type":"trigger","z":"bb09d6cac70a7390","name":"Trigger once","op1":"false","op2":"0","op1type":"bool","op2type":"str","duration":"0","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":2330,"y":460,"wires":[["760ed32d1a2f6f20","9628e7936e76690d"]]},{"id":"cdbf15a40b8ccdb8","type":"api-call-service","z":"bb09d6cac70a7390","name":"","server":"4b50ac5c35178db3","version":5,"debugenabled":false,"domain":"input_number","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_number.internet_time"],"data":"{\"value\":msg.payload}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2110,"y":640,"wires":[[]]},{"id":"95b043ab72270f43","type":"function","z":"bb09d6cac70a7390","name":"stop Internet","func":"msg.payload = 0;\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1470,"y":460,"wires":[["e63f7184.19c09"]]},{"id":"7c1c26d9.83e3d8","type":"change","z":"bb09d6cac70a7390","name":"reset","rules":[{"t":"set","p":"reset","pt":"msg","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2170,"y":480,"wires":[["289ed11e.d7612e"]]},{"id":"c6c7a236a8210e04","type":"ha-button","z":"bb09d6cac70a7390","name":"internet_pause","version":0,"debugenabled":false,"outputs":1,"entityConfig":"63fbe3244e6fb7ad","outputProperties":[{"property":"payload","propertyType":"msg","value":"false","valueType":"bool"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":900,"y":460,"wires":[["760ed32d1a2f6f20"]]},{"id":"3ebf3ab1d90bff70","type":"ha-button","z":"bb09d6cac70a7390","name":"internet_play","version":0,"debugenabled":false,"outputs":1,"entityConfig":"408964c402a98ccd","outputProperties":[{"property":"payload","propertyType":"msg","value":"true","valueType":"bool"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":890,"y":420,"wires":[["8940809f7eeb8a74"]]},{"id":"fd4582015067944f","type":"ha-button","z":"bb09d6cac70a7390","name":"rest_internet_v1","version":0,"debugenabled":false,"outputs":1,"entityConfig":"b85d449ab40c7ebf","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":900,"y":640,"wires":[["652d84d963dc81b2"]]},{"id":"4dde939cf2b0f053","type":"ha-button","z":"bb09d6cac70a7390","name":"add_time_internet_v1","version":0,"debugenabled":false,"outputs":1,"entityConfig":"fdd8d565cf73cbb5","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":920,"y":700,"wires":[["e4ada3ae82eea590"]]},{"id":"19f74b0d742ceea6","type":"ha-button","z":"bb09d6cac70a7390","name":"remove_time_internet_v1","version":0,"debugenabled":false,"outputs":1,"entityConfig":"0a0a549c3a971c62","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":930,"y":760,"wires":[["9ce86dd714051134"]]},{"id":"4a44b30ac570fa4b","type":"ui_button","z":"bb09d6cac70a7390","name":"","group":"c50fec45.1c008","order":1,"width":0,"height":0,"passthru":false,"label":"Pause","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"","payloadType":"date","topic":"topic","topicType":"msg","x":730,"y":460,"wires":[["760ed32d1a2f6f20"]]},{"id":"e285126f235b4ebb","type":"ui_button","z":"bb09d6cac70a7390","name":"","group":"c50fec45.1c008","order":2,"width":0,"height":0,"passthru":false,"label":"Play","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"","payloadType":"date","topic":"topic","topicType":"msg","x":730,"y":420,"wires":[["8940809f7eeb8a74"]]},{"id":"0d46c73181f094ca","type":"time-inject","z":"bb09d6cac70a7390","name":"Reset at Midnight","nameInt":"¹⏲ 00:00 = timestamp","positionConfig":"9a046662c4f3913f","props":[{"p":"","pt":"msgPayload","v":"","vt":"date","o":"","oT":"none","oM":"60000","f":0,"fS":0,"fT":"UNIX timestamp (ms)","fI":"0","next":true,"days":"*","months":"*","onlyOddDays":false,"onlyEvenDays":false,"onlyOddWeeks":false,"onlyEvenWeeks":false},{"p":"","pt":"msgTopic","v":"","vt":"str","o":"","oT":"none","oM":"60000","f":0,"fS":0,"fT":"UNIX timestamp (ms)","fI":"0","next":false,"days":"*","months":"*","onlyOddDays":false,"onlyEvenDays":false,"onlyOddWeeks":false,"onlyEvenWeeks":false}],"injectTypeSelect":"time","intervalCount":1,"intervalCountType":"num","intervalCountMultiplier":60000,"time":"00:00","timeType":"entered","offset":0,"offsetType":"none","offsetMultiplier":60000,"timeEnd":"","timeEndType":"entered","timeEndOffset":0,"timeEndOffsetType":"none","timeEndOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","property":"","propertyType":"none","propertyCompare":"true","propertyThreshold":"","propertyThresholdType":"num","timeAlt":"","timeAltType":"entered","timeAltDays":"*","timeAltOnlyOddDays":false,"timeAltOnlyEvenDays":false,"timeAltOnlyOddWeeks":false,"timeAltOnlyEvenWeeks":false,"timeAltMonths":"*","timeAltOffset":0,"timeAltOffsetType":"none","timeAltOffsetMultiplier":60000,"once":true,"onceDelay":"0.2","recalcTime":2,"x":900,"y":580,"wires":[["760ed32d1a2f6f20","652d84d963dc81b2"]]},{"id":"3eab306b16d141fb","type":"time-inject","z":"bb09d6cac70a7390","name":"","nameInt":"¹00:00 - 11:59pm[Mon-Thu] = timestamp ↻1min","positionConfig":"9a046662c4f3913f","props":[{"p":"","pt":"msgPayload","v":"","vt":"date","o":"","oT":"none","oM":"60000","f":0,"fS":0,"fT":"UNIX timestamp (ms)","fI":"0","next":true,"days":"*","months":"*","onlyOddDays":false,"onlyEvenDays":false,"onlyOddWeeks":false,"onlyEvenWeeks":false},{"p":"","pt":"msgTopic","v":"","vt":"str","o":"","oT":"none","oM":"60000","f":0,"fS":0,"fT":"UNIX timestamp (ms)","fI":"0","next":false,"days":"*","months":"*","onlyOddDays":false,"onlyEvenDays":false,"onlyOddWeeks":false,"onlyEvenWeeks":false}],"injectTypeSelect":"interval-time","intervalCount":1,"intervalCountType":"num","intervalCountMultiplier":"60000","time":"00:00","timeType":"entered","offset":0,"offsetType":"none","offsetMultiplier":60000,"timeEnd":"11:59pm","timeEndType":"entered","timeEndOffset":0,"timeEndOffsetType":"none","timeEndOffsetMultiplier":60000,"timeDays":"1,2,3,4","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","property":"","propertyType":"none","propertyCompare":"true","propertyThreshold":"","propertyThresholdType":"num","timeAlt":"","timeAltType":"entered","timeAltDays":"*","timeAltOnlyOddDays":false,"timeAltOnlyEvenDays":false,"timeAltOnlyOddWeeks":false,"timeAltOnlyEvenWeeks":false,"timeAltMonths":"*","timeAltOffset":0,"timeAltOffsetType":"none","timeAltOffsetMultiplier":60000,"once":true,"onceDelay":0.1,"recalcTime":2,"x":1000,"y":520,"wires":[["a7873f2f6567ebf1"]]},{"id":"9ce86dd714051134","type":"function","z":"bb09d6cac70a7390","name":"Decrement by 10","func":"msg.decrement = 10;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1490,"y":760,"wires":[["3fa3fd799207d51b"]]},{"id":"c162428e7ecb5caa","type":"api-call-service","z":"bb09d6cac70a7390","g":"76dc725016655d9f","name":"Disable access","server":"4b50ac5c35178db3","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.pfsense_lan_filter_rule_1519196725_block_childs_devices"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1740,"y":320,"wires":[["b1d9bed5b650cbed","de0f5ce631c64f33"]]},{"id":"9263895f5aad46ae","type":"switch","z":"bb09d6cac70a7390","g":"76dc725016655d9f","name":"","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"eq","v":"on","vt":"str"},{"t":"false"}],"checkall":"true","repair":false,"outputs":3,"x":1570,"y":280,"wires":[["db99c983b054ec7f"],["db99c983b054ec7f"],["c162428e7ecb5caa"]]},{"id":"db99c983b054ec7f","type":"api-call-service","z":"bb09d6cac70a7390","g":"76dc725016655d9f","name":"Enable access","server":"4b50ac5c35178db3","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.pfsense_lan_filter_rule_1519196725_block_childs_devices"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1740,"y":200,"wires":[["b1d9bed5b650cbed","0739c62cd967450d"]]},{"id":"b1d9bed5b650cbed","type":"api-call-service","z":"bb09d6cac70a7390","g":"76dc725016655d9f","name":"Kill States","server":"4b50ac5c35178db3","version":5,"debugenabled":false,"domain":"automation","service":"trigger","areaId":[],"deviceId":[],"entityId":["automation.kill_pfsense_states_child_devices"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1980,"y":260,"wires":[[]]},{"id":"de0f5ce631c64f33","type":"api-call-service","z":"bb09d6cac70a7390","g":"76dc725016655d9f","name":"","server":"4b50ac5c35178db3","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.child_internet"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2000,"y":320,"wires":[[]]},{"id":"0739c62cd967450d","type":"api-call-service","z":"bb09d6cac70a7390","g":"76dc725016655d9f","name":"","server":"4b50ac5c35178db3","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.child_internet"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2000,"y":200,"wires":[[]]},{"id":"c50fec45.1c008","type":"ui_group","name":"Our Home","tab":"c66320db96b63079","order":3,"disp":false,"width":"6","collapse":false,"className":""},{"id":"4b50ac5c35178db3","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true},{"id":"63fbe3244e6fb7ad","type":"ha-entity-config","server":"4b50ac5c35178db3","deviceConfig":"","name":"internet_pause","version":"6","entityType":"button","haConfig":[{"property":"name","value":"Pause the internet time"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":""}],"resend":false,"debugEnabled":false},{"id":"408964c402a98ccd","type":"ha-entity-config","server":"4b50ac5c35178db3","deviceConfig":"","name":"internet_play","version":"6","entityType":"button","haConfig":[{"property":"name","value":"Start Internet timer"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":""}],"resend":false,"debugEnabled":false},{"id":"b85d449ab40c7ebf","type":"ha-entity-config","server":"4b50ac5c35178db3","deviceConfig":"","name":"rest_internet_v1","version":"6","entityType":"button","haConfig":[{"property":"name","value":"rest_internet_v1"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":""}],"resend":false,"debugEnabled":false},{"id":"fdd8d565cf73cbb5","type":"ha-entity-config","server":"4b50ac5c35178db3","deviceConfig":"","name":"add_time_internet_v1","version":"6","entityType":"button","haConfig":[{"property":"name","value":"add_time_internet_v1"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":""}],"resend":false,"debugEnabled":false},{"id":"0a0a549c3a971c62","type":"ha-entity-config","server":"4b50ac5c35178db3","deviceConfig":"","name":"remove_time_internet_v1","version":"6","entityType":"button","haConfig":[{"property":"name","value":"remove_time_internet_v1"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":""}],"resend":false,"debugEnabled":false},{"id":"9a046662c4f3913f","type":"position-config","name":"","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":99,"timeZoneDST":0,"stateTimeFormat":"3","stateDateFormat":"12","contextStore":""},{"id":"c66320db96b63079","type":"ui_tab","name":"Internet","icon":"dashboard","disabled":false,"hidden":false}]
HA Buttons
type: vertical-stack
cards:
- type: custom:mushroom-entity-card
entity: input_number.internet_time
icon: mdi:clock
icon_color: grey
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
- type: horizontal-stack
cards:
- type: custom:mushroom-entity-card
entity: button.start_internet_timer_2
name: Play
tap_action:
action: toggle
secondary_info: none
layout: vertical
- type: custom:mushroom-entity-card
entity: button.pause_the_internet_time
name: Pause
tap_action:
action: toggle
secondary_info: none
layout: vertical
- type: custom:mushroom-entity-card
entity: switch.child_internet
hold_action:
action: none
double_tap_action:
action: none
layout: vertical
primary_info: state
secondary_info: none
icon: mdi:account-network
tap_action:
action: none
- type: custom:state-switch
entity: >-
{{ "adult" if (user=="admin" or user=="Parent1" or user=="Parent2") else
"child" }}
states:
adult:
type: horizontal-stack
cards:
- type: custom:mushroom-entity-card
entity: button.add_time_internet_v1
tap_action:
action: toggle
hold_action:
action: none
double_tap_action:
action: none
layout: vertical
name: +ExtraTime
secondary_info: none
fill_container: true
- type: custom:mushroom-entity-card
entity: button.remove_time_internet_v1
tap_action:
action: toggle
hold_action:
action: none
double_tap_action:
action: none
layout: vertical
secondary_info: none
name: '-LessTime'
- type: custom:mushroom-entity-card
entity: button.rest_internet_v1
tap_action:
action: toggle
hold_action:
action: none
double_tap_action:
action: none
layout: vertical
secondary_info: none
name: Reset Time
child:
type: custom:gap-card
height: 10
Automation to clear states (devices are set to a fixed ip - I may do this via a separate VLAN later)
- id: '1684845071322'
alias: Kill pfsense States childs Devices
description: Kill pfSense Statess child Devices
trigger: []
condition: []
action:
- service: pfsense.kill_states
data:
entity_id: binary_sensor.pfsense_lan_pending_notices_present
source: 192.168.0.204
- service: pfsense.kill_states
data:
entity_id: binary_sensor.pfsense_lan_pending_notices_present
source: 192.168.0.205
mode: single
Disclaimer:
I edited the flow and buttons to remove real names so apologies if i stuffed it up
It appears to work - but may still have errors.
Others can prob. do a better job. at this than me