From 0031a75b629a4f006bd59b0cbac250300c967a11 Mon Sep 17 00:00:00 2001 From: Andrew Neisch Date: Mon, 27 Feb 2023 16:15:01 -0600 Subject: [PATCH] Tweaks --- .../check-ha-release-compatibility.yml | 5 +- README.md | 8 +- custom_components/hacs/base.py | 42 ++++++-- custom_components/hacs/manifest.json | 6 +- custom_components/hacs/repairs.py | 2 +- custom_components/hacs/repositories/base.py | 50 +++++---- custom_components/hacs/translations/en.json | 2 +- custom_components/hacs/utils/backup.py | 4 +- custom_components/hacs/utils/data.py | 6 +- custom_components/hacs/utils/store.py | 4 +- custom_components/hacs/utils/template.py | 4 +- .../hacs/websocket/repositories.py | 5 +- extras/Node-RED/flows.json | 2 +- .../docker-compose/other/docker-compose.yml | 19 +++- .../docker-compose/unified/docker-compose.yml | 19 +++- images/nodered_1.png | Bin 1455 -> 1455 bytes images/nodered_2.png | Bin 1391 -> 1391 bytes images/nodered_3.png | Bin 1888 -> 1888 bytes packages/irrigation.yaml | 2 +- www/community/lovelace-wallpanel/wallpanel.js | 2 +- .../lovelace-wallpanel/wallpanel.js.gz | Bin 24206 -> 24211 bytes .../numberbox-card/numberbox-card.js | 96 +++++++++++++----- .../numberbox-card/numberbox-card.js.gz | Bin 5084 -> 5289 bytes 23 files changed, 203 insertions(+), 75 deletions(-) diff --git a/.github/workflows/check-ha-release-compatibility.yml b/.github/workflows/check-ha-release-compatibility.yml index 568df4d3..e9ae56d5 100644 --- a/.github/workflows/check-ha-release-compatibility.yml +++ b/.github/workflows/check-ha-release-compatibility.yml @@ -13,7 +13,8 @@ on: jobs: check-ha-config: name: Check Configuration - runs-on: ubuntu-latest + #runs-on: ubuntu-latest + runs-on: self-hosted steps: - name: Log Trigger Type run: 'echo "Trigger: ${{ github.event_name }}"' @@ -78,4 +79,4 @@ jobs: release_name: Release for v${{ github.event.client_payload.version }} body: Release for v${{ github.event.client_payload.version }} draft: false - prerelease: false \ No newline at end of file + prerelease: false diff --git a/README.md b/README.md index bb6958a9..a8b231f8 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ Entities in the [`camera`](https://www.home-assistant.io/components/camera) doma Entities in the [`climate`](https://www.home-assistant.io/components/climate) domain | 1 Entities in the [`counter`](https://www.home-assistant.io/components/counter) domain | 1 Entities in the [`cover`](https://www.home-assistant.io/components/cover) domain | 5 -Entities in the [`device_tracker`](https://www.home-assistant.io/components/device_tracker) domain | 21 +Entities in the [`device_tracker`](https://www.home-assistant.io/components/device_tracker) domain | 22 Entities in the [`fan`](https://www.home-assistant.io/components/fan) domain | 3 Entities in the [`group`](https://www.home-assistant.io/components/group) domain | 13 Entities in the [`input_boolean`](https://www.home-assistant.io/components/input_boolean) domain | 23 @@ -92,17 +92,17 @@ Entities in the [`remote`](https://www.home-assistant.io/components/remote) doma Entities in the [`scene`](https://www.home-assistant.io/components/scene) domain | 2 Entities in the [`script`](https://www.home-assistant.io/components/script) domain | 46 Entities in the [`select`](https://www.home-assistant.io/components/select) domain | 22 -Entities in the [`sensor`](https://www.home-assistant.io/components/sensor) domain | 355 +Entities in the [`sensor`](https://www.home-assistant.io/components/sensor) domain | 357 Entities in the [`setter`](https://www.home-assistant.io/components/setter) domain | 1 Entities in the [`siren`](https://www.home-assistant.io/components/siren) domain | 1 Entities in the [`sun`](https://www.home-assistant.io/components/sun) domain | 1 -Entities in the [`switch`](https://www.home-assistant.io/components/switch) domain | 148 +Entities in the [`switch`](https://www.home-assistant.io/components/switch) domain | 149 Entities in the [`timer`](https://www.home-assistant.io/components/timer) domain | 1 Entities in the [`update`](https://www.home-assistant.io/components/update) domain | 25 Entities in the [`vacuum`](https://www.home-assistant.io/components/vacuum) domain | 1 Entities in the [`weather`](https://www.home-assistant.io/components/weather) domain | 2 Entities in the [`zone`](https://www.home-assistant.io/components/zone) domain | 6 -**Total state objects** | **1139** +**Total state objects** | **1143** ## The HACS integrations/plugins that I use: **Appdaemon**:
[aneisch/follow_me_appdaemon](https://github.com/aneisch/follow_me_appdaemon)
diff --git a/custom_components/hacs/base.py b/custom_components/hacs/base.py index 80def76e..5a97c55b 100644 --- a/custom_components/hacs/base.py +++ b/custom_components/hacs/base.py @@ -457,7 +457,9 @@ def _write_file(): try: await self.hass.async_add_executor_job(_write_file) - except BaseException as error: # lgtm [py/catch-base-exception] pylint: disable=broad-except + except ( + BaseException # lgtm [py/catch-base-exception] pylint: disable=broad-except + ) as error: self.log.error("Could not write data to %s - %s", file_path, error) return False @@ -476,7 +478,9 @@ async def async_can_update(self) -> int: f"{reset.hour}:{reset.minute}:{reset.second}", ) self.disable_hacs(HacsDisabledReason.RATE_LIMIT) - except BaseException as exception: # lgtm [py/catch-base-exception] pylint: disable=broad-except + except ( + BaseException # lgtm [py/catch-base-exception] pylint: disable=broad-except + ) as exception: self.log.exception(exception) return 0 @@ -515,7 +519,9 @@ async def async_github_api_method( raise exception except GitHubException as exception: _exception = exception - except BaseException as exception: # lgtm [py/catch-base-exception] pylint: disable=broad-except + except ( + BaseException # lgtm [py/catch-base-exception] pylint: disable=broad-except + ) as exception: self.log.exception(exception) _exception = exception @@ -726,7 +732,9 @@ async def async_download_file(self, url: str, *, headers: dict | None = None) -> await asyncio.sleep(1) continue - except BaseException as exception: # lgtm [py/catch-base-exception] pylint: disable=broad-except + except ( + BaseException # lgtm [py/catch-base-exception] pylint: disable=broad-except + ) as exception: self.log.exception("Download failed - %s", exception) return None @@ -742,7 +750,9 @@ async def async_recreate_entities(self) -> None: entry=self.configuration.config_entry, platforms=platforms, ) - self.hass.config_entries.async_setup_platforms(self.configuration.config_entry, platforms) + await self.hass.config_entries.async_forward_entry_setups( + self.configuration.config_entry, platforms + ) @callback def async_dispatch(self, signal: HacsDispatchEvent, data: dict | None = None) -> None: @@ -764,7 +774,18 @@ def set_active_categories(self) -> None: if self.configuration.appdaemon: self.enable_hacs_category(HacsCategory.APPDAEMON) if self.configuration.netdaemon: - self.enable_hacs_category(HacsCategory.NETDAEMON) + downloaded_netdaemon = [ + x + for x in self.repositories.list_downloaded + if x.data.category == HacsCategory.NETDAEMON + ] + if len(downloaded_netdaemon) != 0: + self.log.warning( + "NetDaemon in HACS is deprectaded. It will stop working in the future. " + "Please remove all your current NetDaemon repositories from HACS " + "and download them manually if you want to continue using them." + ) + self.enable_hacs_category(HacsCategory.NETDAEMON) async def async_load_hacs_from_github(self, _=None) -> None: """Load HACS from GitHub.""" @@ -849,6 +870,15 @@ async def async_get_category_repositories_experimental(self, category: str) -> N repository.repository_manifest.update_data( {**dict(HACS_MANIFEST_KEYS_TO_EXPORT), **manifest} ) + self.async_dispatch( + HacsDispatchEvent.REPOSITORY, + { + "id": 1337, + "action": "update", + "repository": repository.data.full_name, + "repository_id": repository.data.id, + }, + ) if category == "integration": self.status.inital_fetch_done = True diff --git a/custom_components/hacs/manifest.json b/custom_components/hacs/manifest.json index dea58ad5..fb8a0afd 100644 --- a/custom_components/hacs/manifest.json +++ b/custom_components/hacs/manifest.json @@ -1,4 +1,6 @@ { + "domain": "hacs", + "name": "HACS", "codeowners": [ "@ludeeus" ], @@ -12,12 +14,10 @@ "repairs" ], "documentation": "https://hacs.xyz/docs/configuration/start", - "domain": "hacs", "iot_class": "cloud_polling", "issue_tracker": "https://github.com/hacs/integration/issues", - "name": "HACS", "requirements": [ "aiogithubapi>=22.10.1" ], - "version": "1.30.1" + "version": "1.31.0" } \ No newline at end of file diff --git a/custom_components/hacs/repairs.py b/custom_components/hacs/repairs.py index 02c99b1e..0b9ecb8f 100644 --- a/custom_components/hacs/repairs.py +++ b/custom_components/hacs/repairs.py @@ -25,7 +25,7 @@ async def async_step_init( ) -> data_entry_flow.FlowResult: """Handle the first step of a fix flow.""" - return await (self.async_step_confirm_restart()) + return await self.async_step_confirm_restart() async def async_step_confirm_restart( self, user_input: dict[str, str] | None = None diff --git a/custom_components/hacs/repositories/base.py b/custom_components/hacs/repositories/base.py index 60422368..c35ce69f 100644 --- a/custom_components/hacs/repositories/base.py +++ b/custom_components/hacs/repositories/base.py @@ -102,6 +102,7 @@ ("description", ""), ("downloads", 0), ("domain", None), + ("etag_releases", None), ("etag_repository", None), ("full_name", ""), ("last_commit", None), @@ -143,6 +144,7 @@ class RepositoryData: domain: str = None downloads: int = 0 etag_repository: str = None + etag_releases: str = None file_name: str = "" first_install: bool = False full_name: str = "" @@ -505,14 +507,18 @@ async def common_registration(self) -> None: self.data.description = self.data.description @concurrent(concurrenttasks=10, backoff_time=5) - async def common_update(self, ignore_issues=False, force=False) -> bool: + async def common_update(self, ignore_issues=False, force=False, skip_releases=False) -> bool: """Common information update steps of the repository.""" self.logger.debug("%s Getting repository information", self.string) # Attach repository current_etag = self.data.etag_repository try: - await self.common_update_data(ignore_issues=ignore_issues, force=force) + await self.common_update_data( + ignore_issues=ignore_issues, + force=force, + skip_releases=skip_releases, + ) except HacsRepositoryExistException: self.data.full_name = self.hacs.common.renamed_repositories[self.data.full_name] await self.common_update_data(ignore_issues=ignore_issues, force=force) @@ -746,9 +752,8 @@ def _info_file_variants() -> tuple[str, ...]: def remove(self) -> None: """Run remove tasks.""" - self.logger.info("%s Starting removal", self.string) - if self.hacs.repositories.is_registered(repository_id=str(self.data.id)): + self.logger.info("%s Starting removal", self.string) self.hacs.repositories.unregister(self) async def uninstall(self) -> None: @@ -830,7 +835,9 @@ async def remove_local_directory(self) -> None: "%s Presumed local content path %s does not exist", self.string, local_path ) - except BaseException as exception: # lgtm [py/catch-base-exception] pylint: disable=broad-except + except ( + BaseException # lgtm [py/catch-base-exception] pylint: disable=broad-except + ) as exception: self.logger.debug("%s Removing %s failed with %s", self.string, local_path, exception) return False return True @@ -1048,6 +1055,7 @@ async def common_update_data( ignore_issues: bool = False, force: bool = False, retry=False, + skip_releases=False, ) -> None: """Common update data.""" releases = [] @@ -1096,19 +1104,20 @@ async def common_update_data( raise HacsException(f"{self} Repository has been requested to be removed.") # Get releases. - try: - releases = await self.get_releases( - prerelease=self.data.show_beta, - returnlimit=self.hacs.configuration.release_limit, - ) - if releases: - self.data.releases = True - self.releases.objects = releases - self.data.published_tags = [x.tag_name for x in self.releases.objects] - self.data.last_version = next(iter(self.data.published_tags)) + if not skip_releases: + try: + releases = await self.get_releases( + prerelease=self.data.show_beta, + returnlimit=self.hacs.configuration.release_limit, + ) + if releases: + self.data.releases = True + self.releases.objects = releases + self.data.published_tags = [x.tag_name for x in self.releases.objects] + self.data.last_version = next(iter(self.data.published_tags)) - except HacsException: - self.data.releases = False + except HacsException: + self.data.releases = False if not self.force_branch: self.ref = self.version_to_download() @@ -1118,6 +1127,9 @@ async def common_update_data( if assets := release.assets: downloads = next(iter(assets)).download_count self.data.downloads = downloads + elif self.hacs.system.generator and self.repository_object: + await self.repository_object.set_last_commit() + self.data.last_commit = self.repository_object.last_commit self.hacs.log.debug( "%s Running checks against %s", self.string, self.ref.replace("tags/", "") @@ -1247,7 +1259,9 @@ async def dowload_repository_content(self, content: FileInformation) -> None: return self.validate.errors.append(f"[{content.name}] was not downloaded.") - except BaseException as exception: # lgtm [py/catch-base-exception] pylint: disable=broad-except + except ( + BaseException # lgtm [py/catch-base-exception] pylint: disable=broad-except + ) as exception: self.validate.errors.append(f"Download was not completed [{exception}]") async def async_remove_entity_device(self) -> None: diff --git a/custom_components/hacs/translations/en.json b/custom_components/hacs/translations/en.json index 88adb7ef..e0451b29 100644 --- a/custom_components/hacs/translations/en.json +++ b/custom_components/hacs/translations/en.json @@ -47,7 +47,7 @@ "release_limit": "Number of releases to show.", "debug": "Enable debug.", "appdaemon": "Enable AppDaemon apps discovery & tracking", - "netdaemon": "Enable NetDaemon apps discovery & tracking", + "netdaemon": "[DEPRECATED] Enable NetDaemon apps discovery & tracking", "sidepanel_icon": "Side panel icon", "sidepanel_title": "Side panel title" } diff --git a/custom_components/hacs/utils/backup.py b/custom_components/hacs/utils/backup.py index df17cb67..3f785586 100644 --- a/custom_components/hacs/utils/backup.py +++ b/custom_components/hacs/utils/backup.py @@ -74,7 +74,9 @@ def create(self) -> None: self.local_path, self.backup_path_full, ) - except BaseException as exception: # lgtm [py/catch-base-exception] pylint: disable=broad-except + except ( + BaseException # lgtm [py/catch-base-exception] pylint: disable=broad-except + ) as exception: self.hacs.log.warning("Could not create backup: %s", exception) def restore(self) -> None: diff --git a/custom_components/hacs/utils/data.py b/custom_components/hacs/utils/data.py index 067b71d1..76616dc6 100644 --- a/custom_components/hacs/utils/data.py +++ b/custom_components/hacs/utils/data.py @@ -241,7 +241,9 @@ async def restore(self): self.async_restore_repository(entry, repo_data) self.logger.info(" Restore done") - except BaseException as exception: # lgtm [py/catch-base-exception] pylint: disable=broad-except + except ( + BaseException # lgtm [py/catch-base-exception] pylint: disable=broad-except + ) as exception: self.logger.critical( " [%s] Restore Failed!", exception, exc_info=exception ) @@ -282,6 +284,8 @@ def async_restore_repository(self, entry: str, repository_data: dict[str, Any]): repository.data.description = repository_data.get("description", "") repository.data.downloads = repository_data.get("downloads", 0) repository.data.last_updated = repository_data.get("last_updated", 0) + if self.hacs.system.generator: + repository.data.etag_releases = repository_data.get("etag_releases") repository.data.etag_repository = repository_data.get("etag_repository") repository.data.topics = [ topic for topic in repository_data.get("topics", []) if topic not in TOPIC_FILTER diff --git a/custom_components/hacs/utils/store.py b/custom_components/hacs/utils/store.py index 54eace09..d3a0fc59 100644 --- a/custom_components/hacs/utils/store.py +++ b/custom_components/hacs/utils/store.py @@ -17,7 +17,9 @@ def load(self): """Load the data from disk if version matches.""" try: data = json_util.load_json(self.path) - except BaseException as exception: # lgtm [py/catch-base-exception] pylint: disable=broad-except + except ( + BaseException # lgtm [py/catch-base-exception] pylint: disable=broad-except + ) as exception: _LOGGER.critical( "Could not load '%s', restore it from a backup or delete the file: %s", self.path, diff --git a/custom_components/hacs/utils/template.py b/custom_components/hacs/utils/template.py index 53e3f330..425e2dad 100644 --- a/custom_components/hacs/utils/template.py +++ b/custom_components/hacs/utils/template.py @@ -31,6 +31,8 @@ def render_template(hacs: HacsBase, content: str, context: HacsRepository) -> st version_available=context.releases.last_release, version_installed=context.display_installed_version, ) - except BaseException as exception: # lgtm [py/catch-base-exception] pylint: disable=broad-except + except ( + BaseException # lgtm [py/catch-base-exception] pylint: disable=broad-except + ) as exception: context.logger.debug(exception) return content diff --git a/custom_components/hacs/websocket/repositories.py b/custom_components/hacs/websocket/repositories.py index 58f4bf78..1bc89fba 100644 --- a/custom_components/hacs/websocket/repositories.py +++ b/custom_components/hacs/websocket/repositories.py @@ -164,7 +164,9 @@ async def hacs_repositories_add( category=category, ) - except BaseException as exception: # lgtm [py/catch-base-exception] pylint: disable=broad-except + except ( + BaseException # lgtm [py/catch-base-exception] pylint: disable=broad-except + ) as exception: hacs.async_dispatch( HacsDispatchEvent.ERROR, { @@ -175,7 +177,6 @@ async def hacs_repositories_add( ) else: - hacs.async_dispatch( HacsDispatchEvent.ERROR, { diff --git a/extras/Node-RED/flows.json b/extras/Node-RED/flows.json index 6e35e04d..92559df5 100644 --- a/extras/Node-RED/flows.json +++ b/extras/Node-RED/flows.json @@ -1 +1 @@ -[{"id":"9584418c.dafc2","type":"tab","label":"Automations","disabled":false,"info":""},{"id":"f602e6ba.609d28","type":"tab","label":"Irrigation","disabled":false,"info":""},{"id":"e1dc0b88.463bb8","type":"server","name":"Home Assistant","version":5,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":true,"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":"546e31ed.0db1c","type":"mqtt-broker","name":"Mosquitto","broker":"10.0.1.22","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"9f81fd881d01a666","type":"position-config","name":"","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":"99","timeZoneDST":"0","stateTimeFormat":"3","stateDateFormat":"12"},{"id":"4f8f8feffed26998","type":"sqlitedb","db":"/data/amazon.db","mode":"RWC"},{"id":"2022689a.938918","type":"api-call-service","z":"9584418c.dafc2","name":"Notify Via Wrapper: Opened 1 Minute","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": \"The \" & $lowercase(msg.data.new_state.attributes.friendly_name) & \" has been opened for 1 minute\"\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":910,"y":100,"wires":[[]]},{"id":"8ec438b6.4eb2e8","type":"api-current-state","z":"9584418c.dafc2","name":"Door Notify On","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"true","halt_if_type":"bool","halt_if_compare":"is","entity_id":"input_boolean.door_notify","state_type":"habool","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":480,"y":42,"wires":[["c5124616.c9bd48"],[]]},{"id":"28fa66cd.af058a","type":"trigger","z":"9584418c.dafc2","name":"Wait 1m","op1":"","op2":"1","op1type":"nul","op2type":"str","duration":"1","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":640,"y":100,"wires":[["2022689a.938918"]]},{"id":"9c1d9c7c.ed9c7","type":"change","z":"9584418c.dafc2","name":"Reset If Closed","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":200,"wires":[["28fa66cd.af058a","5c24f744.30fcb8","cf758271.d4fd6","5a740c2d.009864"]]},{"id":"896f5b34.7b4328","type":"api-call-service","z":"9584418c.dafc2","name":"Notify Via Wrapper","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": payload, \"data\": {\"priority\": 1} \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":970,"y":40,"wires":[[]]},{"id":"c5124616.c9bd48","type":"template","z":"9584418c.dafc2","name":"Opened","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{ data.new_state.attributes.friendly_name }} opened","output":"str","x":740,"y":40,"wires":[["896f5b34.7b4328"]]},{"id":"f9d93af6.184028","type":"server-state-changed","z":"9584418c.dafc2","name":"Door Opened","server":"e1dc0b88.463bb8","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.*_door$","entityidfiltertype":"regex","outputinitially":false,"state_type":"habool","haltifstate":"true","halt_if_type":"bool","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":80,"wires":[["8ec438b6.4eb2e8","28fa66cd.af058a","5c24f744.30fcb8","cf758271.d4fd6","5a740c2d.009864"],["9c1d9c7c.ed9c7"]]},{"id":"42796298.a0104c","type":"api-current-state","z":"9584418c.dafc2","name":"Heading Comparison","server":"e1dc0b88.463bb8","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"binary_sensor.gate_heading_comparison","state_type":"habool","blockInputOverrides":true,"outputProperties":[{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":600,"y":340,"wires":[["115d9f48.071141"]]},{"id":"222ebf24.bfbfa","type":"inject","z":"9584418c.dafc2","name":"Every Hour","repeat":"","crontab":"0 0-23 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":190,"y":340,"wires":[["3b804cf9.ada174"]]},{"id":"115d9f48.071141","type":"switch","z":"9584418c.dafc2","name":"Last Changed > 4 hours","property":"data.timeSinceChangedMs","propertyType":"msg","rules":[{"t":"gt","v":"14400000","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":850,"y":340,"wires":[["1eab32fa.1312bd"]]},{"id":"c444f1de.8365f","type":"api-call-service","z":"9584418c.dafc2","name":"Notify Via Wrapper","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": payload \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1330,"y":360,"wires":[[]]},{"id":"9aee0f4b.44e93","type":"trigger-state","z":"9584418c.dafc2","name":"Gate Offline/Online","server":"e1dc0b88.463bb8","version":2,"entityid":"sensor.gate_online_offline","entityidfiltertype":"exact","debugenabled":false,"constraints":[],"inputs":1,"outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","enableInput":true,"x":290,"y":400,"wires":[["cc1f97c7.911bf8"],[]]},{"id":"1fdf1fb6.8cd5d","type":"function","z":"9584418c.dafc2","name":"Create msg object","func":"var message = \"Gate reports \" + msg.payload + \"..\"\n\nreturn { payload: message,topic:msg.topic };","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1090,"y":380,"wires":[["c444f1de.8365f"]]},{"id":"cc1f97c7.911bf8","type":"api-current-state","z":"9584418c.dafc2","name":"Gate Alert On","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"true","halt_if_type":"bool","halt_if_compare":"is","entity_id":"input_boolean.gate_alert","state_type":"habool","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":680,"y":400,"wires":[["1fdf1fb6.8cd5d"],[]]},{"id":"3b804cf9.ada174","type":"api-current-state","z":"9584418c.dafc2","name":"Gate Alert On","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"true","halt_if_type":"bool","halt_if_compare":"is","entity_id":"input_boolean.gate_alert","state_type":"habool","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":380,"y":340,"wires":[["42796298.a0104c"],[]]},{"id":"1eab32fa.1312bd","type":"function","z":"9584418c.dafc2","name":"Create msg object","func":"var last_time = msg.data.timeSinceChangedMs\n\nfunction msToTime(duration) {\n var milliseconds = parseInt((duration % 1000) / 100),\n seconds = Math.floor((duration / 1000) % 60),\n minutes = Math.floor((duration / (1000 * 60)) % 60),\n hours = Math.floor((duration / (1000 * 60 * 60)) % 24);\n\n hours = (hours < 10) ? \"0\" + hours : hours;\n minutes = (minutes < 10) ? \"0\" + minutes : minutes;\n seconds = (seconds < 10) ? \"0\" + seconds : seconds;\n\n return hours + \":\" + minutes + \":\" + seconds + \".\" + milliseconds;\n}\n\nvar message = msg.data.entity_id + \" last changed \" + msToTime(last_time) + \" ago\"\n\nreturn { payload: message,topic:msg.topic };","outputs":1,"noerr":0,"x":1090,"y":340,"wires":[["c444f1de.8365f"]]},{"id":"73550501.be7fbc","type":"trigger-state","z":"9584418c.dafc2","name":"Rack Temperature","server":"e1dc0b88.463bb8","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"sensor.rack_exhaust_temperature","entityidfiltertype":"exact","debugenabled":false,"constraints":[],"inputs":1,"outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"num","enableInput":true,"x":190,"y":578,"wires":[["7dff3ae1.e36a04"],[]]},{"id":"7dff3ae1.e36a04","type":"switch","z":"9584418c.dafc2","name":"Above 90?","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"95","vt":"num"},{"t":"lte","v":"90","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":410,"y":578,"wires":[["29b17ed7.fab972"],["96b5207d.407dd"]]},{"id":"88822bfe.2cc598","type":"api-call-service","z":"9584418c.dafc2","name":"Turn on Fan","server":"e1dc0b88.463bb8","version":5,"domain":"homeassistant","service":"turn_on","areaId":[],"deviceId":[],"entityId":["fan.rack_fan"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":850,"y":520,"wires":[[]]},{"id":"96b5207d.407dd","type":"api-current-state","z":"9584418c.dafc2","name":"Rack Fan","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"true","halt_if_type":"bool","halt_if_compare":"is","entity_id":"fan.rack_fan","state_type":"habool","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":640,"y":598,"wires":[["c7ff978f.ff0728"],[]]},{"id":"b259f0eb.3e83","type":"api-call-service","z":"9584418c.dafc2","name":"Turn off fan","server":"e1dc0b88.463bb8","version":5,"domain":"homeassistant","service":"turn_off","areaId":[],"deviceId":[],"entityId":["fan.rack_fan"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":1090,"y":620,"wires":[[]]},{"id":"fa90c550.d6c948","type":"inject","z":"9584418c.dafc2","name":"At 8 PM","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 20 * * 1,2,4,5,6,0","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":738,"wires":[["1457bf6605a50448"]]},{"id":"e93027cb.6a6308","type":"api-current-state","z":"9584418c.dafc2","name":"Master Bedroom Lamps On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.master_bedroom_lamps","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":700,"y":740,"wires":[["fc81cfda.29ff5"],[]]},{"id":"fc81cfda.29ff5","type":"api-call-service","z":"9584418c.dafc2","name":"Set brightness to 128","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{\"brightness\":\"128\",\"transition\":5, \"entity_id\": msg.data.entity_id}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1021,"y":738,"wires":[[]]},{"id":"c7ff978f.ff0728","type":"api-current-state","z":"9584418c.dafc2","name":"Rack fan auto off?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.rack_fan_auto_off","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":870,"y":620,"wires":[["b259f0eb.3e83"],[]]},{"id":"29b17ed7.fab972","type":"api-current-state","z":"9584418c.dafc2","name":"Rack Fan","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"true","halt_if_type":"bool","halt_if_compare":"is","entity_id":"fan.rack_fan","state_type":"habool","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":640,"y":520,"wires":[[],["88822bfe.2cc598"]]},{"id":"3314ec9f.ca8994","type":"server-state-changed","z":"9584418c.dafc2","name":"Garage Opened","server":"e1dc0b88.463bb8","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"cover.garage_door","entityidfiltertype":"regex","outputinitially":false,"state_type":"str","haltifstate":"open","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":180,"y":140,"wires":[["8ec438b6.4eb2e8"],[]]},{"id":"8ee35d65.a7569","type":"api-current-state","z":"9584418c.dafc2","d":true,"name":"Kitchen Cans On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.kitchen_can_lights","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":670,"y":980,"wires":[["5420f9c0.5356c8"],[]]},{"id":"41b918d5.7ce018","type":"api-current-state","z":"9584418c.dafc2","d":true,"name":"Kitchen Table On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.kitchen_table_light","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":670,"y":1100,"wires":[["d8ad0651.bf7a18"],[]]},{"id":"5420f9c0.5356c8","type":"api-call-service","z":"9584418c.dafc2","name":"Set brightness to 40","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{\"brightness\":\"40\",\"transition\": \"5\", \"entity_id\": msg.data.entity_id}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1020,"y":880,"wires":[[]]},{"id":"77184c93.8790d4","type":"api-current-state","z":"9584418c.dafc2","d":true,"name":"Kitchen Sink On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.kitchen_sink_light","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":670,"y":920,"wires":[["5420f9c0.5356c8"],[]]},{"id":"39a5ce57.78e3d2","type":"api-current-state","z":"9584418c.dafc2","name":"Living Room Cans On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.living_room_can_lights","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":690,"y":860,"wires":[["5420f9c0.5356c8"],[]]},{"id":"5c24f744.30fcb8","type":"trigger","z":"9584418c.dafc2","name":"Wait 5m","op1":"","op2":"5","op1type":"nul","op2type":"str","duration":"5","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":640,"y":140,"wires":[["6aa388d0.707768"]]},{"id":"6aa388d0.707768","type":"api-call-service","z":"9584418c.dafc2","name":"Alexa Announce Opened","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"alexa_media","areaId":[],"deviceId":[],"entityId":[],"data":"{\"message\":\"The\" & $lowercase(msg.data.new_state.attributes.friendly_name) & \"has been opened for\" & msg.payload & \" minutes.\",\"data\":{\"method\":\"all\",\"type\":\"announce\"},\"target\":[\"Office\",\"Kitchen\",\"Master\",\"Living Room\"]}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":870,"y":160,"wires":[[]]},{"id":"cf758271.d4fd6","type":"trigger","z":"9584418c.dafc2","name":"Wait 10m","op1":"","op2":"10","op1type":"nul","op2type":"str","duration":"10","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":640,"y":180,"wires":[["6aa388d0.707768"]]},{"id":"5a740c2d.009864","type":"trigger","z":"9584418c.dafc2","name":"Wait 15m","op1":"","op2":"15","op1type":"nul","op2type":"str","duration":"15","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":640,"y":220,"wires":[["6aa388d0.707768"]]},{"id":"ea19fe14.80749","type":"api-current-state","z":"9584418c.dafc2","d":true,"name":"Entryway On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.entryway_light","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":660,"y":1040,"wires":[["5420f9c0.5356c8"],[]]},{"id":"ea2604f9.4cdf98","type":"api-current-state","z":"9584418c.dafc2","name":"Living Room Sconces On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.living_room_sconces","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":700,"y":800,"wires":[["fc81cfda.29ff5"],[]]},{"id":"8a82f465.846018","type":"comment","z":"9584418c.dafc2","name":"100% = 255","info":"","x":990,"y":811,"wires":[]},{"id":"d8ad0651.bf7a18","type":"api-call-service","z":"9584418c.dafc2","name":"Set brightness to 80","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{\"brightness\":\"80\",\"transition\": \"5\", \"entity_id\": msg.data.entity_id}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1020,"y":960,"wires":[[]]},{"id":"86bc310cbc0562af","type":"inject","z":"9584418c.dafc2","name":"At 10PM","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 23 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":1260,"wires":[["2fb6a7afb6502a32","8c55985bffebd56a"]]},{"id":"2fb6a7afb6502a32","type":"api-call-service","z":"9584418c.dafc2","name":"Front Porch Lights to 40","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.front_porch_lights"],"data":"{\"brightness\":\"40\",\"transition\":5}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":430,"y":1260,"wires":[[]]},{"id":"3f2a2e4d99057b69","type":"server-state-changed","z":"9584418c.dafc2","name":"Front Door Motion","server":"e1dc0b88.463bb8","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.front_door_motion","entityidfiltertype":"exact","outputinitially":false,"state_type":"habool","haltifstate":"true","halt_if_type":"bool","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":190,"y":1440,"wires":[["17b35d69307a8455"],[]]},{"id":"67312d79a5108126","type":"api-current-state","z":"9584418c.dafc2","name":"Front Porch On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.front_porch_lights","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":650,"y":1400,"wires":[["3e399d83e4e7f4c3"],[]]},{"id":"3e399d83e4e7f4c3","type":"api-call-service","z":"9584418c.dafc2","name":"Front Porch Lights to 254","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.front_porch_lights"],"data":"{\"brightness\":\"254\",\"transition\":2}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":910,"y":1400,"wires":[["59f5bc2571b0f12f"]]},{"id":"59f5bc2571b0f12f","type":"delay","z":"9584418c.dafc2","name":"","pauseType":"delay","timeout":"60","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":580,"y":1500,"wires":[["c68c969a6b8c2833"]]},{"id":"c68c969a6b8c2833","type":"api-call-service","z":"9584418c.dafc2","name":"Front Porch Lights to 40","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.front_porch_lights"],"data":"{\"brightness\":\"40\",\"transition\":5}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":810,"y":1500,"wires":[[]]},{"id":"d9cc182cc3eb2a93","type":"inject","z":"9584418c.dafc2","name":"At 10 PM","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 22 * * 3","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":780,"wires":[["1457bf6605a50448"]]},{"id":"b1a99d9698d831b2","type":"server-state-changed","z":"9584418c.dafc2","name":"433 Motion","server":"e1dc0b88.463bb8","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.433_front_porch_motion","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":1500,"wires":[["17b35d69307a8455","d11c183fff8d848d"]]},{"id":"17b35d69307a8455","type":"within-time-switch","z":"9584418c.dafc2","name":"","nameInt":"","positionConfig":"9f81fd881d01a666","startTime":"22:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"sunriseStart","endTimeType":"pdsTime","endOffset":"-30","endOffsetType":"num","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"withinTimeValue":"","withinTimeValueType":"msgInput","outOfTimeValue":"","outOfTimeValueType":"msgInput","tsCompare":"0","x":420,"y":1440,"wires":[["67312d79a5108126"],[]]},{"id":"d11c183fff8d848d","type":"change","z":"9584418c.dafc2","name":"Reset","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":1500,"wires":[["59f5bc2571b0f12f"]]},{"id":"a9a323de66b6f772","type":"http request","z":"9584418c.dafc2","name":"Get Aircraft","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://vrs:8080/VirtualRadar/AircraftList.json","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"Content-Type","valueType":"other","valueValue":"application/json"}],"x":410,"y":1760,"wires":[["7da69a7e8ecadc7c","91afebbf8b9edf05","4ca1a5ad47ce7a18","2cd08c8da06afaf6"]]},{"id":"ee139512bcad0966","type":"inject","z":"9584418c.dafc2","name":"Every 10 Seconds","props":[],"repeat":"10","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":210,"y":1760,"wires":[["a9a323de66b6f772"]]},{"id":"7da69a7e8ecadc7c","type":"function","z":"9584418c.dafc2","name":"Amazon","func":"var alert = {}\nvar message = \"Airborne:\\n\"\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n if (typeof msg.payload.acList[i].Reg !== \"undefined\" && typeof msg.payload.acList[i].Man !== \"undefined\") {\n if (msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n //if (msg.payload.acList[i].Reg.endsWith(\"PA\") && msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n alert[msg.payload.acList[i].Reg] = msg.payload.acList[i].Icao\n }\n }\n}\n\nif (Object.keys(alert).length > 0) {\n for (const [key, value] of Object.entries(alert)) {\n message += key + \": https://globe.adsbexchange.com/?icao=\" + value + \"\\n\"\n }\n return { payload: message + \"https://vrs.aneis.ch\" }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":580,"y":1740,"wires":[["5684b08aacd6d225"]]},{"id":"26e32b1d7824356a","type":"api-call-service","z":"9584418c.dafc2","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_adsb","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": payload \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1000,"y":1740,"wires":[[]]},{"id":"3a82b835.c57d48","type":"function","z":"9584418c.dafc2","name":"Rate Limiter","func":"var interval = (1000*60*10); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":810,"y":1680,"wires":[["26e32b1d7824356a"]]},{"id":"91afebbf8b9edf05","type":"function","z":"9584418c.dafc2","name":"Interesting Tail #","func":"var alert = {}\nvar message = \"Interesting:\\n\"\n\nvar interesting = [\"N518GS\", \"N628TS\", \"82-8000\"]\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n if (typeof msg.payload.acList[i].Reg !== \"undefined\") {\n if (interesting.includes(msg.payload.acList[i].Reg)) {\n alert[msg.payload.acList[i].Reg] = msg.payload.acList[i].Icao\n }\n }\n}\n\nif (Object.keys(alert).length > 0) {\n for (const [key, value] of Object.entries(alert)) {\n message += key + \": https://globe.adsbexchange.com/?icao=\" + value + \"\\n\"\n }\n return { payload: message + \"https://vrs.aneis.ch\" }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":600,"y":1680,"wires":[["3a82b835.c57d48"]]},{"id":"5684b08aacd6d225","type":"function","z":"9584418c.dafc2","name":"Rate Limiter","func":"var interval = (1000*60); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":810,"y":1740,"wires":[["26e32b1d7824356a"]]},{"id":"4ca1a5ad47ce7a18","type":"function","z":"9584418c.dafc2","name":"Amazon Landing","func":"var alert = {}\nvar message = \"Landing:\\n\"\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n if (typeof msg.payload.acList[i].Reg !== \"undefined\" && typeof msg.payload.acList[i].Man !== \"undefined\") {\n //if (msg.payload.acList[i].Reg.endsWith(\"PA\") && msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n if (msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n if (msg.payload.acList[i].Alt < 50){\n alert[msg.payload.acList[i].Reg] = msg.payload.acList[i].Icao\n }\n }\n }\n}\n\nif (Object.keys(alert).length > 0) {\n for (const [key, value] of Object.entries(alert)) {\n message += key + \": https://globe.adsbexchange.com/?icao=\" + value + \"\\n\"\n }\n return { payload: message + \"https://vrs.aneis.ch\" }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":610,"y":1800,"wires":[["ba68e03143ba4af8"]]},{"id":"ba68e03143ba4af8","type":"function","z":"9584418c.dafc2","name":"Rate Limiter","func":"var interval = (1000*60); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":810,"y":1800,"wires":[["26e32b1d7824356a"]]},{"id":"5f1d1b471a1c7cbb","type":"sqlite","z":"9584418c.dafc2","mydb":"4f8f8feffed26998","sqlquery":"msg.topic","sql":"","name":"Amazon","x":800,"y":1860,"wires":[["ea911291f04c7d18"]]},{"id":"2cd08c8da06afaf6","type":"function","z":"9584418c.dafc2","name":"Write Amazon Landing","func":"var sql = \"\"\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n var latlong = \"0,0\"\n if (typeof msg.payload.acList[i].Reg !== \"undefined\" && typeof msg.payload.acList[i].Lat !== \"undefined\" && typeof msg.payload.acList[i].Long !== \"undefined\") {\n //if (msg.payload.acList[i].Reg.endsWith(\"PA\") && msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n if (msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n if (msg.payload.acList[i].Alt < 50){\n latlong = msg.payload.acList[i].Lat + \",\" + msg.payload.acList[i].Long.toString()\n sql += `INSERT INTO deliveries (timestamp, registration, latlong, altitude) VALUES (\"${Date.now()}\", \"${msg.payload.acList[i].Reg}\", \"${latlong}\", \"${msg.payload.acList[i].Alt}\"); `\n }\n }\n }\n}\n\nif (sql.length > 0){\n msg.topic = sql\n return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":620,"y":1860,"wires":[["5f1d1b471a1c7cbb"]]},{"id":"ea911291f04c7d18","type":"api-call-service","z":"9584418c.dafc2","name":"Generate Heatmap","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"shell_command","service":"generate_heatmap","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1010,"y":1860,"wires":[[]]},{"id":"cde7b3c9ca39891b","type":"link in","z":"9584418c.dafc2","name":"","links":["1457bf6605a50448"],"x":345,"y":760,"wires":[["e93027cb.6a6308","ea2604f9.4cdf98","39a5ce57.78e3d2","77184c93.8790d4","8ee35d65.a7569","ea19fe14.80749","41b918d5.7ce018"]]},{"id":"1457bf6605a50448","type":"link out","z":"9584418c.dafc2","name":"","links":["cde7b3c9ca39891b"],"x":315,"y":760,"wires":[]},{"id":"8c55985bffebd56a","type":"api-call-service","z":"9584418c.dafc2","name":"Front Sconces Off","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.front_sconces"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":410,"y":1200,"wires":[[]]},{"id":"fae7fa701710e258","type":"server-state-changed","z":"9584418c.dafc2","name":"Front Door Unlock","server":"e1dc0b88.463bb8","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"lock.front_door","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"unlocked","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":190,"y":1380,"wires":[["17b35d69307a8455"],[]]},{"id":"54bad548.7e9fcc","type":"ha-get-entities","z":"f602e6ba.609d28","name":"Get \"On\" Sprinklers","server":"e1dc0b88.463bb8","version":0,"rules":[{"property":"entity_id","logic":"starts_with","value":"switch.irrigation","valueType":"str"},{"property":"entity_id","logic":"does_not_include","value":"switch.irrigation_master_valve,switch.irrigation_24v_power","valueType":"str"},{"property":"state","logic":"is","value":"on","valueType":"str"}],"output_type":"array","output_empty_results":true,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":370,"y":100,"wires":[["bcbf413e.7b188"]]},{"id":"5a10cd93.8e94b4","type":"inject","z":"f602e6ba.609d28","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":true,"onceDelay":0.1,"topic":"","payloadType":"date","x":150,"y":100,"wires":[["54bad548.7e9fcc"]]},{"id":"a77808ff.3f1288","type":"switch","z":"f602e6ba.609d28","name":"On Longer than 26 minutes?","property":"payload[0].timeSinceChangedMs","propertyType":"msg","rules":[{"t":"gte","v":"1600000","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":700,"y":60,"wires":[["54ae6ec3.1bc63"]]},{"id":"54ae6ec3.1bc63","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn Off Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload[0].entity_id }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":960,"y":60,"wires":[[]]},{"id":"bcbf413e.7b188","type":"switch","z":"f602e6ba.609d28","name":"More Than 0 Entities?","property":"payload","propertyType":"msg","rules":[{"t":"nempty"},{"t":"empty"}],"checkall":"true","repair":false,"outputs":2,"x":380,"y":160,"wires":[["a77808ff.3f1288","3b848bce.76aea4"],["c42e6d62.7a24c"]]},{"id":"3b848bce.76aea4","type":"change","z":"f602e6ba.609d28","name":"Reset Delay","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":650,"y":100,"wires":[["cdd3b7ef.04a618"]]},{"id":"43dedcca.ac7734","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn Off Master","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.irrigation_master_valve"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1460,"y":180,"wires":[[]]},{"id":"b4335c36.09adb","type":"comment","z":"f602e6ba.609d28","name":"Set Auto-Off for Sprinkler","info":"","x":250,"y":40,"wires":[]},{"id":"c42e6d62.7a24c","type":"api-current-state","z":"f602e6ba.609d28","name":"Master On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.irrigation_master_valve","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":650,"y":160,"wires":[["cdd3b7ef.04a618"],["3b848bce.76aea4"]]},{"id":"d269f175.c9dc6","type":"server-events","z":"f602e6ba.609d28","name":"Custom Water Event Fired","server":"e1dc0b88.463bb8","version":2,"eventType":"irrigation_custom_water","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"},{"property":"event_type","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"}],"x":170,"y":320,"wires":[["883f2c00.1d94e8"]]},{"id":"3367e45f.cc981c","type":"function","z":"f602e6ba.609d28","name":"++","func":"if ( (msg.i += 1) < msg.zones.length ) return msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":650,"y":380,"wires":[["116d5bb3.ee92a4"]]},{"id":"116d5bb3.ee92a4","type":"function","z":"f602e6ba.609d28","name":"For Each","func":"if( msg.i == undefined ) msg.i = 0;\n\nmsg.payload = msg.zones[ msg.i ];\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":820,"y":320,"wires":[["565ee5c1.561bfc","80df47d5.602888","e2c37b65c5582c2b"]]},{"id":"80df47d5.602888","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn On Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1040,"y":320,"wires":[[]]},{"id":"fb46876c.845298","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn Off Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1300,"y":380,"wires":[["98eeafa7.bd2b9","860a4c61d7557dc9"]]},{"id":"98eeafa7.bd2b9","type":"delay","z":"f602e6ba.609d28","name":"Delay 5","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":960,"y":460,"wires":[["3367e45f.cc981c"]]},{"id":"7c3d09ca.229958","type":"comment","z":"f602e6ba.609d28","name":"Fired From HA Python Script or Automation","info":"","x":310,"y":260,"wires":[]},{"id":"565ee5c1.561bfc","type":"change","z":"f602e6ba.609d28","name":"Set Delay Variable","rules":[{"t":"set","p":"delay","pt":"msg","to":"payload.time* 60000","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":380,"wires":[["22a20603.86a06a"]]},{"id":"22a20603.86a06a","type":"stoptimer-varidelay","z":"f602e6ba.609d28","duration":"5","durationType":"num","units":"Millisecond","payloadtype":"num","payloadval":"0","name":"Delay","reporting":"every_second","persist":false,"x":1070,"y":380,"wires":[["fb46876c.845298"],[],["a8d96e.1f00969"]]},{"id":"a8d96e.1f00969","type":"mqtt out","z":"f602e6ba.609d28","name":"Publish Time Remaining","topic":"sensor/irrigation_time_remaining","qos":"","retain":"","broker":"546e31ed.0db1c","x":1330,"y":320,"wires":[]},{"id":"cdd3b7ef.04a618","type":"trigger","z":"f602e6ba.609d28","name":"Wait 1m","op1":"","op2":"0","op1type":"nul","op2type":"str","duration":"1","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":860,"y":120,"wires":[["5e9007a27732bba9"]]},{"id":"3b838f49.e10c","type":"comment","z":"f602e6ba.609d28","name":"Garden Drip - Bib timer start 7:58 and runs for 25 min","info":"","x":300,"y":540,"wires":[]},{"id":"3b656b89.1ac154","type":"inject","z":"f602e6ba.609d28","name":"5:00 Attempt","props":[{"p":"payload"}],"repeat":"","crontab":"00 05 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"zone\":\"switch.irrigation_front_beds\",\"time\":10,\"name\":\"Front beds\"},{\"zone\":\"switch.irrigation_front_lawn\",\"time\":20,\"name\":\"Front lawn\"},{\"zone\":\"switch.irrigation_left_and_main_rear_lawn\",\"time\":20,\"name\":\"Left and main rear lawn\"},{\"zone\":\"switch.irrigation_front_and_right_rear_lawn\",\"time\":20,\"name\":\"Front and right rear lawn\"},{\"zone\":\"switch.irrigation_side_lawn\",\"time\":20,\"name\":\"Side lawn\"}]","payloadType":"json","x":160,"y":760,"wires":[["493b435f.c9851c"]]},{"id":"fdb6234.55064e","type":"function","z":"f602e6ba.609d28","name":"++","func":"if ( (msg.i += 1) < msg.zones.length ) return msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":290,"y":1680,"wires":[["857c8b4f.d19808"]]},{"id":"857c8b4f.d19808","type":"function","z":"f602e6ba.609d28","name":"For Each","func":"if( msg.i == undefined ) msg.i = 0;\n\nmsg.payload = msg.zones[ msg.i ];\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":300,"y":1620,"wires":[["5ebabb53.f9e834"]]},{"id":"a60b0459.b34598","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn On Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1160,"y":1620,"wires":[["12f649bd.98f9f6"]]},{"id":"a082bd08.49c44","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn Off Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":820,"y":1800,"wires":[["6c216ad5.e58054"]]},{"id":"6c216ad5.e58054","type":"delay","z":"f602e6ba.609d28","name":"Delay 10","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":480,"y":1740,"wires":[["fdb6234.55064e"]]},{"id":"12f649bd.98f9f6","type":"change","z":"f602e6ba.609d28","name":"Set Delay Variable","rules":[{"t":"set","p":"delay","pt":"msg","to":"payload.time* 60000","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":830,"y":1680,"wires":[["d029ec72.ae401"]]},{"id":"5eaebc41.9491c4","type":"switch","z":"f602e6ba.609d28","name":"Last Ran >= Template Hrs Ago","property":"data.continue","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":1680,"wires":[["b7ac1681.a64af8"],["fdb6234.55064e"]]},{"id":"a9b82dcc.1843e","type":"api-render-template","z":"f602e6ba.609d28","name":"Evaluate Template","server":"e1dc0b88.463bb8","version":0,"template":"","resultsLocation":"data.continue","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":830,"y":1560,"wires":[["a298ba43aff58e18"]]},{"id":"5ebabb53.f9e834","type":"template","z":"f602e6ba.609d28","name":"Template: Zone Last Ran >= 71 hours","field":"template","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{%- set entity_name = \"input_datetime{{ payload.zone }}\" | regex_replace(find='switch', replace='', ignorecase=False) -%}\n{%- set time = (as_timestamp(now()) - as_timestamp(states(entity_name+\"_last_start\"))) | int -%}\n{% if time >= 71*3600 %}1{% else %}0{% endif %}","output":"str","x":530,"y":1560,"wires":[["a9b82dcc.1843e"]]},{"id":"b7ac1681.a64af8","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn On Master Valve","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_master_valve"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":840,"y":1620,"wires":[["3c20bed9.9f3812"]]},{"id":"d029ec72.ae401","type":"stoptimer-varidelay","z":"f602e6ba.609d28","duration":"5","durationType":"num","units":"Millisecond","payloadtype":"num","payloadval":"0","name":"Delay","reporting":"every_second","persist":false,"ignoretimerpass":false,"x":790,"y":1740,"wires":[["a082bd08.49c44","8a25411f.1fe15"],[],["df183b71.5ccca8"]]},{"id":"df183b71.5ccca8","type":"mqtt out","z":"f602e6ba.609d28","name":"Publish Time Remaining","topic":"sensor/irrigation_time_remaining","qos":"","retain":"","broker":"546e31ed.0db1c","x":1070,"y":1760,"wires":[]},{"id":"da687baa.d8ed88","type":"api-call-service","z":"f602e6ba.609d28","name":"Notify via Wrapper","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": alert \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1270,"y":1720,"wires":[[]]},{"id":"8a25411f.1fe15","type":"function","z":"f602e6ba.609d28","name":"Create msg object","func":"var message = \"Sprinkler auto-run: \" + msg.payload.name + \" ran for \" + msg.payload.time + \" minutes\"\n\nreturn { alert: message };","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1050,"y":1720,"wires":[["da687baa.d8ed88"]]},{"id":"3c20bed9.9f3812","type":"delay","z":"f602e6ba.609d28","name":"2s","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":1010,"y":1620,"wires":[["a60b0459.b34598"]]},{"id":"493b435f.c9851c","type":"api-current-state","z":"f602e6ba.609d28","name":"Schedule Enabled","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.lawn_irrigation_scheduling","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":390,"y":760,"wires":[["8c060f00.cf577"],["7b12e66f.57d068"]]},{"id":"9f3dd0a4.22c76","type":"api-get-history","z":"f602e6ba.609d28","name":"Rainfall 48h","server":"e1dc0b88.463bb8","version":0,"startdate":"","enddate":"","entityid":"sensor.netatmo_home_rain_sum_rain_today_inches","entityidtype":"is","useRelativeTime":true,"relativeTime":"48h","flatten":true,"output_type":"array","output_location_type":"msg","output_location":"payload","x":230,"y":960,"wires":[["3b42f047.f6721"]]},{"id":"3b42f047.f6721","type":"function","z":"f602e6ba.609d28","name":"Check Rainfall","func":"var rain_override = false\n\nfor (var i = 0; i < msg.payload.length; i++) {\n if (parseFloat(msg.payload[i].state) > 0.10) {\n rain_override = true\n }\n}\n\n// top = proceed\n// bottom = overridden\nif (rain_override === true) {\n return [ null, {rain_override} ];\n} \nelse {\n return [ {rain_override}, null ];\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":420,"y":960,"wires":[["dcdeabc7.780578"],["773941a7.152da"]]},{"id":"773941a7.152da","type":"api-call-service","z":"f602e6ba.609d28","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"setter","service":"set","areaId":[],"deviceId":[],"entityId":["sensor.sprinker_interrupt_reason"],"data":"{ \"state\": \"Rainfall\", \"attributes\": {\"friendly_name\":\"Sprinkler Reason\", \"icon\":\"mdi:weather-lightning-rainy\"}}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":610,"y":1000,"wires":[[]]},{"id":"7b12e66f.57d068","type":"api-call-service","z":"f602e6ba.609d28","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"setter","service":"set","areaId":[],"deviceId":[],"entityId":["sensor.sprinker_interrupt_reason"],"data":"{ \"state\": \"Automation Off\", \"attributes\": {\"friendly_name\":\"Sprinkler Reason\", \"icon\":\"mdi:cancel\"}}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":610,"y":800,"wires":[[]]},{"id":"8c060f00.cf577","type":"link out","z":"f602e6ba.609d28","name":"","links":["f1cbfe0.7dfb4","576b66fa1bd202a3"],"x":575,"y":740,"wires":[]},{"id":"3290b2c2.62032e","type":"api-call-service","z":"f602e6ba.609d28","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"setter","service":"set","areaId":[],"deviceId":[],"entityId":["sensor.sprinker_interrupt_reason"],"data":"{ \"state\": \"Rain Chance\", \"attributes\": {\"friendly_name\":\"Sprinkler Reason\", \"icon\":\"mdi:weather-lightning-rainy\"}}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":610,"y":1120,"wires":[[]]},{"id":"4422f61c.847d88","type":"link in","z":"f602e6ba.609d28","name":"","links":["3ff9ce03ef7b554b"],"x":115,"y":960,"wires":[["9f3dd0a4.22c76"]]},{"id":"dcdeabc7.780578","type":"link out","z":"f602e6ba.609d28","name":"","links":["1eaa857e.b6b8db","c90fd5e6.c5c678"],"x":575,"y":940,"wires":[]},{"id":"722d03d6.2ff77c","type":"link in","z":"f602e6ba.609d28","name":"","links":["8d4bfe8e.ee805","d67106b42368e630"],"x":115,"y":1400,"wires":[["d40b6c7e.af78d"]]},{"id":"af4788fe.215ba8","type":"link out","z":"f602e6ba.609d28","name":"","links":["405789f7.0727a8"],"x":575,"y":1420,"wires":[]},{"id":"405789f7.0727a8","type":"link in","z":"f602e6ba.609d28","name":"","links":["db46e0c1.f9ab5","af4788fe.215ba8"],"x":75,"y":1560,"wires":[["9941ac76.663b1"]]},{"id":"9941ac76.663b1","type":"template","z":"f602e6ba.609d28","name":"Zone Settings Lawn","field":"zones","fieldType":"msg","format":"json","syntax":"mustache","template":"[\n {\n \"zone\": \"switch.irrigation_front_lawn\",\n \"time\": 25,\n \"name\": \"Front lawn\"\n },\n {\n \"zone\": \"switch.irrigation_left_and_main_rear_lawn\",\n \"time\": 25,\n \"name\": \"Left and main rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_front_and_right_rear_lawn\",\n \"time\": 25,\n \"name\": \"Front and right rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_side_lawn\",\n \"time\": 20,\n \"name\": \"Side lawn\"\n }\n]","output":"json","x":220,"y":1560,"wires":[["857c8b4f.d19808"]]},{"id":"5933da9a.d9f024","type":"comment","z":"f602e6ba.609d28","name":"Scheduled Sprinklers -- Run Lawn Zones","info":"","x":300,"y":1520,"wires":[]},{"id":"c90fd5e6.c5c678","type":"link in","z":"f602e6ba.609d28","name":"","links":["dcdeabc7.780578"],"x":115,"y":1080,"wires":[["870d9d95.e93ce"]]},{"id":"862ad27a.d347d","type":"link out","z":"f602e6ba.609d28","name":"","links":["83edf648.3f9ed8"],"x":575,"y":1060,"wires":[]},{"id":"870d9d95.e93ce","type":"api-current-state","z":"f602e6ba.609d28","name":"Weather","server":"e1dc0b88.463bb8","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"weather.kcll_daynight","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":220,"y":1080,"wires":[["21d9168d.46ef5a"]]},{"id":"21d9168d.46ef5a","type":"function","z":"f602e6ba.609d28","name":"Rain Chance","func":"// Check next 4 precipitation_probability values\n// HA Template: \n// {% for j in state_attr(\"weather.kcll_daynight\",\"forecast\")[:4] %}\n// {{ j.precipitation_probability }}\n// {% endfor %}\n\nvar forecast_override = false\n\n// if (parseFloat(msg.payload) > 40) {\n// forecast_override = true\n// }\n \nfor (var i = 0; i < 4; i++) {\n if (parseFloat(msg.data.attributes.forecast[i].precipitation_probability) > 40) {\n forecast_override = true\n }\n}\n\n// top = proceed\n// bottom = overridden\nif (forecast_override === true) {\n return [ null, {forecast_override} ];\n} \nelse {\n return [ {forecast_override}, null ];\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":410,"y":1080,"wires":[["862ad27a.d347d"],["3290b2c2.62032e"]]},{"id":"808e6a81.92e2e8","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn On Master Valve","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_master_valve"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":440,"y":380,"wires":[["e42ff3d9.593dc"]]},{"id":"883f2c00.1d94e8","type":"api-current-state","z":"f602e6ba.609d28","name":"24v Power","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.irrigation_24v_power","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":230,"y":380,"wires":[["808e6a81.92e2e8"],[]]},{"id":"e42ff3d9.593dc","type":"delay","z":"f602e6ba.609d28","name":"Delay 5","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":460,"y":320,"wires":[["76160bc4.8cd644"]]},{"id":"76160bc4.8cd644","type":"change","z":"f602e6ba.609d28","name":"","rules":[{"t":"set","p":"zones","pt":"msg","to":"payload.event.zones","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":320,"wires":[["116d5bb3.ee92a4"]]},{"id":"499b8bfb.3152a4","type":"api-call-service","z":"f602e6ba.609d28","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"setter","service":"set","areaId":[],"deviceId":[],"entityId":["sensor.sprinker_interrupt_reason"],"data":"{\"state\":\"Too Windy\",\"attributes\":{\"friendly_name\":\"Sprinkler Reason\",\"icon\":\"mdi:weather-windy\"}}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":610,"y":1320,"wires":[[]]},{"id":"83edf648.3f9ed8","type":"link in","z":"f602e6ba.609d28","name":"","links":["862ad27a.d347d"],"x":115,"y":1200,"wires":[["2720fe53.e6c2d2"]]},{"id":"8d4bfe8e.ee805","type":"link out","z":"f602e6ba.609d28","name":"","links":["722d03d6.2ff77c"],"x":575,"y":1180,"wires":[]},{"id":"2720fe53.e6c2d2","type":"api-current-state","z":"f602e6ba.609d28","name":"Wind <= 10 MPH","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"10","halt_if_type":"num","halt_if_compare":"lte","entity_id":"sensor.nws_wind_speed","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":250,"y":1200,"wires":[["8d4bfe8e.ee805"],["a3d75225807b70eb"]]},{"id":"70dfaa6a.be6a74","type":"inject","z":"f602e6ba.609d28","name":"08:00","props":[{"p":"payload"}],"repeat":"","crontab":"00 05 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"zone\":\"switch.irrigation_front_beds\",\"time\":10,\"name\":\"Front beds\"},{\"zone\":\"switch.irrigation_front_lawn\",\"time\":20,\"name\":\"Front lawn\"},{\"zone\":\"switch.irrigation_left_and_main_rear_lawn\",\"time\":20,\"name\":\"Left and main rear lawn\"},{\"zone\":\"switch.irrigation_front_and_right_rear_lawn\",\"time\":20,\"name\":\"Front and right rear lawn\"},{\"zone\":\"switch.irrigation_side_lawn\",\"time\":20,\"name\":\"Side lawn\"}]","payloadType":"json","x":140,"y":580,"wires":[["c05e6454.2f85b8"]]},{"id":"c05e6454.2f85b8","type":"api-current-state","z":"f602e6ba.609d28","name":"Drip Irrigation Enabled","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.drip_irrigation_scheduling","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":320,"y":580,"wires":[["3461c5c.34e3d3a"],[]]},{"id":"3461c5c.34e3d3a","type":"api-call-service","z":"f602e6ba.609d28","name":"On","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_drip"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":490,"y":580,"wires":[["293b659b.8348ea"]]},{"id":"acd1bab8.aee3d8","type":"api-call-service","z":"f602e6ba.609d28","name":"Off","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.irrigation_drip"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":730,"y":580,"wires":[["c68eb12d.9599a"]]},{"id":"293b659b.8348ea","type":"delay","z":"f602e6ba.609d28","name":"20 Min","pauseType":"delay","timeout":"20","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":610,"y":580,"wires":[["acd1bab8.aee3d8"]]},{"id":"b60d2f74.cc7f6","type":"api-call-service","z":"f602e6ba.609d28","name":"On","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_drip"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":970,"y":580,"wires":[["da67a902.f7ef48"]]},{"id":"ed0380b5.fa017","type":"api-call-service","z":"f602e6ba.609d28","name":"Off","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.irrigation_drip"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1210,"y":580,"wires":[[]]},{"id":"da67a902.f7ef48","type":"delay","z":"f602e6ba.609d28","name":"5 Sec","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":1090,"y":580,"wires":[["ed0380b5.fa017"]]},{"id":"c68eb12d.9599a","type":"delay","z":"f602e6ba.609d28","name":"10 Min","pauseType":"delay","timeout":"10","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":850,"y":580,"wires":[["b60d2f74.cc7f6"]]},{"id":"b76b5030.7d402","type":"comment","z":"f602e6ba.609d28","name":"Release Pressure","info":"","x":900,"y":540,"wires":[]},{"id":"edc724f1.d2e458","type":"comment","z":"f602e6ba.609d28","name":"Lawn Attempt","info":"","x":170,"y":680,"wires":[]},{"id":"583f46a3.fc4c38","type":"inject","z":"f602e6ba.609d28","name":"8:00 Attempt","props":[{"p":"payload"}],"repeat":"","crontab":"00 08 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"zone\":\"switch.irrigation_front_beds\",\"time\":10,\"name\":\"Front beds\"},{\"zone\":\"switch.irrigation_front_lawn\",\"time\":20,\"name\":\"Front lawn\"},{\"zone\":\"switch.irrigation_left_and_main_rear_lawn\",\"time\":20,\"name\":\"Left and main rear lawn\"},{\"zone\":\"switch.irrigation_front_and_right_rear_lawn\",\"time\":20,\"name\":\"Front and right rear lawn\"},{\"zone\":\"switch.irrigation_side_lawn\",\"time\":20,\"name\":\"Side lawn\"}]","payloadType":"json","x":820,"y":740,"wires":[["d9147878.b61cf8"]]},{"id":"d9147878.b61cf8","type":"api-current-state","z":"f602e6ba.609d28","name":"Schedule Enabled","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.lawn_irrigation_scheduling","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":1050,"y":740,"wires":[["c7e5552e.7f8a08"],[]]},{"id":"804ab203.434e4","type":"api-get-history","z":"f602e6ba.609d28","name":"Rainfall 24h","server":"e1dc0b88.463bb8","version":0,"startdate":"","enddate":"","entityid":"sensor.netatmo_home_rain_sum_rain_today_inches","entityidtype":"is","useRelativeTime":true,"relativeTime":"24h","flatten":true,"output_type":"array","output_location_type":"msg","output_location":"payload","x":890,"y":1080,"wires":[["c50a5938.e47538"]]},{"id":"c50a5938.e47538","type":"function","z":"f602e6ba.609d28","name":"Check Rainfall","func":"var rain_override = false\n\nfor (var i = 0; i < msg.payload.length; i++) {\n if (parseFloat(msg.payload[i].state) > 0.10) {\n rain_override = true\n }\n}\n\n// top = proceed\n// bottom = overridden\nif (rain_override === true) {\n return [ null, {rain_override} ];\n} \nelse {\n return [ {rain_override}, null ];\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1080,"y":1080,"wires":[["f587589f.d739e8"],[]]},{"id":"c7e5552e.7f8a08","type":"link out","z":"f602e6ba.609d28","name":"","links":["f1cbfe0.7dfb4","f6881b4bf93c27c5"],"x":1235,"y":740,"wires":[]},{"id":"6bcf06fb.9ca748","type":"link in","z":"f602e6ba.609d28","name":"","links":["4f2902edc77f2d3b"],"x":775,"y":1080,"wires":[["804ab203.434e4"]]},{"id":"f587589f.d739e8","type":"link out","z":"f602e6ba.609d28","name":"","links":["1eaa857e.b6b8db","9d851699.6a8458"],"x":1235,"y":1080,"wires":[]},{"id":"d9d17e8f.590e6","type":"link in","z":"f602e6ba.609d28","name":"","links":["4fae5b92.a9cd44","fdcfa1521191fa40"],"x":775,"y":1440,"wires":[["418058c4.af3158"]]},{"id":"d9f893eb.834f3","type":"link out","z":"f602e6ba.609d28","name":"","links":["5ce1803b.06628"],"x":1235,"y":1440,"wires":[]},{"id":"9d851699.6a8458","type":"link in","z":"f602e6ba.609d28","name":"","links":["f587589f.d739e8"],"x":775,"y":1200,"wires":[["c3279051.91a85"]]},{"id":"760894e3.db2a9c","type":"link out","z":"f602e6ba.609d28","name":"","links":["ceef2a94.9378c8"],"x":1235,"y":1200,"wires":[]},{"id":"c3279051.91a85","type":"api-current-state","z":"f602e6ba.609d28","name":"Weather","server":"e1dc0b88.463bb8","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"weather.kcll_daynight","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":880,"y":1200,"wires":[["20b5172c.13dd58"]]},{"id":"20b5172c.13dd58","type":"function","z":"f602e6ba.609d28","name":"Rain Chance","func":"// Check next 4 precipitation_probability values\n// HA Template: \n// {% for j in state_attr(\"weather.kcll_daynight\",\"forecast\")[:4] %}\n// {{ j.precipitation_probability }}\n// {% endfor %}\n\nvar forecast_override = false\n\n// if (parseFloat(msg.payload) > 40) {\n// forecast_override = true\n// }\n\nfor (var i = 0; i < 4; i++) {\n if (parseFloat(msg.data.attributes.forecast[i].precipitation_probability) > 40) {\n forecast_override = true\n }\n}\n\n// top = proceed\n// bottom = overridden\nif (forecast_override === true) {\n return [ null, {forecast_override} ];\n} \nelse {\n return [ {forecast_override}, null ];\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1070,"y":1200,"wires":[["760894e3.db2a9c"],[]]},{"id":"ceef2a94.9378c8","type":"link in","z":"f602e6ba.609d28","name":"","links":["760894e3.db2a9c"],"x":775,"y":1320,"wires":[["2bf89956.475926"]]},{"id":"4fae5b92.a9cd44","type":"link out","z":"f602e6ba.609d28","name":"","links":["d9d17e8f.590e6"],"x":1235,"y":1320,"wires":[]},{"id":"2bf89956.475926","type":"api-current-state","z":"f602e6ba.609d28","name":"Wind <= 10 MPH","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"10","halt_if_type":"num","halt_if_compare":"lte","entity_id":"sensor.nws_wind_speed","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":910,"y":1320,"wires":[["4fae5b92.a9cd44"],[]]},{"id":"aaacee72.fc35a","type":"comment","z":"f602e6ba.609d28","name":"Front Beds Attempt","info":"","x":850,"y":680,"wires":[]},{"id":"a2ab7368.923fb","type":"template","z":"f602e6ba.609d28","name":"Zone Settings Front Beds","field":"zones","fieldType":"msg","format":"json","syntax":"mustache","template":"{\n \"zone\": \"switch.irrigation_front_beds\",\n \"time\": 15,\n \"name\": \"Front beds\"\n}","output":"json","x":230,"y":1880,"wires":[["62b5545bc6d6e627"]]},{"id":"a31e3daf.17207","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn On Master Valve","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_master_valve"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":540,"y":1880,"wires":[["21ced698.708b5a"]]},{"id":"21ced698.708b5a","type":"delay","z":"f602e6ba.609d28","name":"2s","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":710,"y":1880,"wires":[["c661d489.9c9bc8"]]},{"id":"c661d489.9c9bc8","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn On Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": msg.zones.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":860,"y":1880,"wires":[["accc6697.196268"]]},{"id":"accc6697.196268","type":"change","z":"f602e6ba.609d28","name":"Set Delay Variable","rules":[{"t":"set","p":"delay","pt":"msg","to":"msg.zones.time* 60000","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1070,"y":1880,"wires":[["487ff788.8c5c98"]]},{"id":"487ff788.8c5c98","type":"stoptimer-varidelay","z":"f602e6ba.609d28","duration":"5","durationType":"num","units":"Millisecond","payloadtype":"num","payloadval":"0","name":"Delay","reporting":"every_second","persist":false,"ignoretimerpass":false,"x":830,"y":1940,"wires":[["2238b09b.1b5b5","9129b06e.d8925"],[],["84258ddd.41da4"]]},{"id":"2238b09b.1b5b5","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn Off Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": msg.zones.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":880,"y":2020,"wires":[[]]},{"id":"84258ddd.41da4","type":"mqtt out","z":"f602e6ba.609d28","name":"Publish Time Remaining","topic":"sensor/irrigation_time_remaining","qos":"","retain":"","broker":"546e31ed.0db1c","x":1110,"y":2000,"wires":[]},{"id":"9129b06e.d8925","type":"function","z":"f602e6ba.609d28","name":"Create msg object","func":"var message = \"Sprinkler auto-run: \" + msg.zones.name + \" ran for \" + msg.zones.time + \" minutes\"\n\nreturn { alert: message };","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1030,"y":1940,"wires":[["d83b5ff7a2212931"]]},{"id":"5ce1803b.06628","type":"link in","z":"f602e6ba.609d28","name":"","links":["db46e0c1.f9ab5","d9f893eb.834f3"],"x":75,"y":1880,"wires":[["a2ab7368.923fb"]]},{"id":"2afa6b1a.8012b4","type":"comment","z":"f602e6ba.609d28","name":"Scheduled Sprinklers -- Run Front Beds","info":"","x":290,"y":1840,"wires":[]},{"id":"815fddc0.6604c","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn On 24v","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_24v_power"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":450,"y":1420,"wires":[["af4788fe.215ba8"]]},{"id":"418058c4.af3158","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn On 24v","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_24v_power"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":890,"y":1440,"wires":[["d9f893eb.834f3"]]},{"id":"1ae21386.a831bc","type":"inject","z":"f602e6ba.609d28","name":"10:00 24v Off","props":[],"repeat":"","crontab":"00 10 * * *","once":false,"onceDelay":0.1,"topic":"","x":820,"y":840,"wires":[["117145a7.67e99a","882aff35f788008b"]]},{"id":"117145a7.67e99a","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn Off 24v","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.irrigation_24v_power"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1030,"y":800,"wires":[[]]},{"id":"d40b6c7e.af78d","type":"api-call-service","z":"f602e6ba.609d28","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"setter","service":"set","areaId":[],"deviceId":[],"entityId":["sensor.sprinker_interrupt_reason"],"data":"{\"state\":\"None\",\"attributes\":{\"friendly_name\":\"Sprinkler Reason\",\"icon\":\"mdi:check\"}}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":270,"y":1380,"wires":[["815fddc0.6604c"]]},{"id":"63f07877e73b952a","type":"switch","z":"f602e6ba.609d28","name":"More Than 0 Entities?","property":"payload","propertyType":"msg","rules":[{"t":"nempty"},{"t":"empty"}],"checkall":"true","repair":false,"outputs":2,"x":1080,"y":180,"wires":[[],["749afd72791a5127"]]},{"id":"5e9007a27732bba9","type":"ha-get-entities","z":"f602e6ba.609d28","name":"Get \"On\" Sprinklers","server":"e1dc0b88.463bb8","version":0,"rules":[{"property":"entity_id","logic":"starts_with","value":"switch.irrigation","valueType":"str"},{"property":"entity_id","logic":"does_not_include","value":"switch.irrigation_master_valve,switch.irrigation_24v_power","valueType":"str"},{"property":"state","logic":"is","value":"on","valueType":"str"}],"output_type":"array","output_empty_results":true,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":1050,"y":120,"wires":[["63f07877e73b952a"]]},{"id":"06d6255efdc31c47","type":"api-current-state","z":"f602e6ba.609d28","name":"Force Run","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_force_run","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":230,"y":860,"wires":[["5420d0eed32223fb"],["3ff9ce03ef7b554b"]]},{"id":"5420d0eed32223fb","type":"link out","z":"f602e6ba.609d28","name":"","links":["f1cbfe0.7dfb4","08e3098cf183e086"],"x":475,"y":840,"wires":[]},{"id":"3ff9ce03ef7b554b","type":"link out","z":"f602e6ba.609d28","name":"","links":["f1cbfe0.7dfb4","4422f61c.847d88"],"x":475,"y":880,"wires":[]},{"id":"576b66fa1bd202a3","type":"link in","z":"f602e6ba.609d28","name":"","links":["8c060f00.cf577"],"x":115,"y":860,"wires":[["06d6255efdc31c47"]]},{"id":"7350c911a0b1a86d","type":"api-current-state","z":"f602e6ba.609d28","name":"Force Run","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_force_run","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":890,"y":960,"wires":[["fdcfa1521191fa40"],["4f2902edc77f2d3b"]]},{"id":"fdcfa1521191fa40","type":"link out","z":"f602e6ba.609d28","name":"","links":["f1cbfe0.7dfb4","d9d17e8f.590e6"],"x":1235,"y":920,"wires":[]},{"id":"4f2902edc77f2d3b","type":"link out","z":"f602e6ba.609d28","name":"","links":["f1cbfe0.7dfb4","6bcf06fb.9ca748"],"x":1235,"y":980,"wires":[]},{"id":"f6881b4bf93c27c5","type":"link in","z":"f602e6ba.609d28","name":"","links":["c7e5552e.7f8a08"],"x":775,"y":960,"wires":[["7350c911a0b1a86d"]]},{"id":"9ebfc0893b208a38","type":"api-call-service","z":"f602e6ba.609d28","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"setter","service":"set","areaId":[],"deviceId":[],"entityId":["sensor.sprinker_interrupt_reason"],"data":"{\"state\":\"Force Run\",\"attributes\":{\"friendly_name\":\"Sprinkler Reason\",\"icon\":\"mdi:check\"}}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":270,"y":1460,"wires":[["815fddc0.6604c"]]},{"id":"08e3098cf183e086","type":"link in","z":"f602e6ba.609d28","name":"","links":["5420d0eed32223fb"],"x":115,"y":1440,"wires":[["9ebfc0893b208a38"]]},{"id":"882aff35f788008b","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn Off Force Run","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_force_run"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1050,"y":860,"wires":[[]]},{"id":"a298ba43aff58e18","type":"api-current-state","z":"f602e6ba.609d28","name":"Force Run","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_force_run","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":550,"y":1620,"wires":[["b7ac1681.a64af8"],["5eaebc41.9491c4"]]},{"id":"8f026440401a841f","type":"api-current-state","z":"f602e6ba.609d28","name":"Wind <= 10 MPH","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"10","halt_if_type":"num","halt_if_compare":"lte","entity_id":"sensor.nws_wind_speed","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":250,"y":1320,"wires":[["d67106b42368e630"],["499b8bfb.3152a4"]]},{"id":"a3d75225807b70eb","type":"delay","z":"f602e6ba.609d28","name":"1 Hour Delay","pauseType":"delay","timeout":"1","timeoutUnits":"hours","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":250,"y":1260,"wires":[["8f026440401a841f"]]},{"id":"d67106b42368e630","type":"link out","z":"f602e6ba.609d28","name":"","links":["722d03d6.2ff77c"],"x":575,"y":1260,"wires":[]},{"id":"e2c37b65c5582c2b","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn Off Start/Stop tracking","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["automation.store_sprinkler_start_stop_times"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1040,"y":280,"wires":[[]]},{"id":"860a4c61d7557dc9","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn On Start/Stop tracking","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["automation.store_sprinkler_start_stop_times"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1340,"y":440,"wires":[[]]},{"id":"061b74f643477dd9","type":"switch","z":"f602e6ba.609d28","name":"More Than 0 Entities?","property":"payload","propertyType":"msg","rules":[{"t":"nempty"},{"t":"empty"}],"checkall":"true","repair":false,"outputs":2,"x":1360,"y":120,"wires":[["43dedcca.ac7734"],[]]},{"id":"749afd72791a5127","type":"trigger","z":"f602e6ba.609d28","name":"Wait 1m","op1":"","op2":"0","op1type":"nul","op2type":"str","duration":"5","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":1240,"y":60,"wires":[["061b74f643477dd9"]]},{"id":"62b5545bc6d6e627","type":"template","z":"f602e6ba.609d28","name":"Template: Zone Last Ran >= 23 hours","field":"template","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{%- set entity_name = \"input_datetime{{ zones.zone }}\" | regex_replace(find='switch', replace='', ignorecase=False) -%}\n{%- set time = (as_timestamp(now()) - as_timestamp(states(entity_name+\"_last_start\"))) | int -%}\n{% if time >= 23*3600 %}1{% else %}0{% endif %}","output":"str","x":290,"y":1940,"wires":[["aa53225140781dd7"]]},{"id":"aa53225140781dd7","type":"api-render-template","z":"f602e6ba.609d28","name":"Evaluate Template","server":"e1dc0b88.463bb8","version":0,"template":"","resultsLocation":"data.continue","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":230,"y":2000,"wires":[["8113d83074ff7701"]]},{"id":"8113d83074ff7701","type":"switch","z":"f602e6ba.609d28","name":"Last Ran >= Template Hrs Ago","property":"data.continue","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":510,"y":2000,"wires":[["a31e3daf.17207"],[]]},{"id":"d83b5ff7a2212931","type":"api-call-service","z":"f602e6ba.609d28","name":"Notify via Wrapper","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": alert \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1250,"y":1940,"wires":[[]]}] \ No newline at end of file +[{"id":"9584418c.dafc2","type":"tab","label":"Automations","disabled":false,"info":""},{"id":"f602e6ba.609d28","type":"tab","label":"Irrigation","disabled":false,"info":""},{"id":"e1dc0b88.463bb8","type":"server","name":"Home Assistant","version":5,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":true,"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":"546e31ed.0db1c","type":"mqtt-broker","name":"Mosquitto","broker":"10.0.1.22","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"9f81fd881d01a666","type":"position-config","name":"","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":"99","timeZoneDST":"0","stateTimeFormat":"3","stateDateFormat":"12"},{"id":"4f8f8feffed26998","type":"sqlitedb","db":"/data/amazon.db","mode":"RWC"},{"id":"2022689a.938918","type":"api-call-service","z":"9584418c.dafc2","name":"Notify Via Wrapper: Opened 1 Minute","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": \"The \" & $lowercase(msg.data.new_state.attributes.friendly_name) & \" has been opened for 1 minute\"\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":910,"y":100,"wires":[[]]},{"id":"8ec438b6.4eb2e8","type":"api-current-state","z":"9584418c.dafc2","name":"Door Notify On","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"true","halt_if_type":"bool","halt_if_compare":"is","entity_id":"input_boolean.door_notify","state_type":"habool","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":480,"y":42,"wires":[["c5124616.c9bd48"],[]]},{"id":"28fa66cd.af058a","type":"trigger","z":"9584418c.dafc2","name":"Wait 1m","op1":"","op2":"1","op1type":"nul","op2type":"str","duration":"1","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":640,"y":100,"wires":[["2022689a.938918"]]},{"id":"9c1d9c7c.ed9c7","type":"change","z":"9584418c.dafc2","name":"Reset If Closed","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":200,"wires":[["28fa66cd.af058a","5c24f744.30fcb8","cf758271.d4fd6","5a740c2d.009864"]]},{"id":"896f5b34.7b4328","type":"api-call-service","z":"9584418c.dafc2","name":"Notify Via Wrapper","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": payload, \"data\": {\"priority\": 1} \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":970,"y":40,"wires":[[]]},{"id":"c5124616.c9bd48","type":"template","z":"9584418c.dafc2","name":"Opened","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{ data.new_state.attributes.friendly_name }} opened","output":"str","x":740,"y":40,"wires":[["896f5b34.7b4328"]]},{"id":"f9d93af6.184028","type":"server-state-changed","z":"9584418c.dafc2","name":"Door Opened","server":"e1dc0b88.463bb8","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.*_door$","entityidfiltertype":"regex","outputinitially":false,"state_type":"habool","haltifstate":"true","halt_if_type":"bool","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":80,"wires":[["8ec438b6.4eb2e8","28fa66cd.af058a","5c24f744.30fcb8","cf758271.d4fd6","5a740c2d.009864"],["9c1d9c7c.ed9c7"]]},{"id":"42796298.a0104c","type":"api-current-state","z":"9584418c.dafc2","name":"Heading Comparison","server":"e1dc0b88.463bb8","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"binary_sensor.gate_heading_comparison","state_type":"habool","blockInputOverrides":true,"outputProperties":[{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":600,"y":340,"wires":[["115d9f48.071141"]]},{"id":"222ebf24.bfbfa","type":"inject","z":"9584418c.dafc2","name":"Every Hour","repeat":"","crontab":"0 0-23 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":190,"y":340,"wires":[["3b804cf9.ada174"]]},{"id":"115d9f48.071141","type":"switch","z":"9584418c.dafc2","name":"Last Changed > 4 hours","property":"data.timeSinceChangedMs","propertyType":"msg","rules":[{"t":"gt","v":"14400000","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":850,"y":340,"wires":[["1eab32fa.1312bd"]]},{"id":"c444f1de.8365f","type":"api-call-service","z":"9584418c.dafc2","name":"Notify Via Wrapper","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": payload \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1330,"y":360,"wires":[[]]},{"id":"9aee0f4b.44e93","type":"trigger-state","z":"9584418c.dafc2","name":"Gate Offline/Online","server":"e1dc0b88.463bb8","version":2,"entityid":"sensor.gate_online_offline","entityidfiltertype":"exact","debugenabled":false,"constraints":[],"inputs":1,"outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","enableInput":true,"x":290,"y":400,"wires":[["cc1f97c7.911bf8"],[]]},{"id":"1fdf1fb6.8cd5d","type":"function","z":"9584418c.dafc2","name":"Create msg object","func":"var message = \"Gate reports \" + msg.payload + \"..\"\n\nreturn { payload: message,topic:msg.topic };","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1090,"y":380,"wires":[["c444f1de.8365f"]]},{"id":"cc1f97c7.911bf8","type":"api-current-state","z":"9584418c.dafc2","name":"Gate Alert On","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"true","halt_if_type":"bool","halt_if_compare":"is","entity_id":"input_boolean.gate_alert","state_type":"habool","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":680,"y":400,"wires":[["1fdf1fb6.8cd5d"],[]]},{"id":"3b804cf9.ada174","type":"api-current-state","z":"9584418c.dafc2","name":"Gate Alert On","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"true","halt_if_type":"bool","halt_if_compare":"is","entity_id":"input_boolean.gate_alert","state_type":"habool","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":380,"y":340,"wires":[["42796298.a0104c"],[]]},{"id":"1eab32fa.1312bd","type":"function","z":"9584418c.dafc2","name":"Create msg object","func":"var last_time = msg.data.timeSinceChangedMs\n\nfunction msToTime(duration) {\n var milliseconds = parseInt((duration % 1000) / 100),\n seconds = Math.floor((duration / 1000) % 60),\n minutes = Math.floor((duration / (1000 * 60)) % 60),\n hours = Math.floor((duration / (1000 * 60 * 60)) % 24);\n\n hours = (hours < 10) ? \"0\" + hours : hours;\n minutes = (minutes < 10) ? \"0\" + minutes : minutes;\n seconds = (seconds < 10) ? \"0\" + seconds : seconds;\n\n return hours + \":\" + minutes + \":\" + seconds + \".\" + milliseconds;\n}\n\nvar message = msg.data.entity_id + \" last changed \" + msToTime(last_time) + \" ago\"\n\nreturn { payload: message,topic:msg.topic };","outputs":1,"noerr":0,"x":1090,"y":340,"wires":[["c444f1de.8365f"]]},{"id":"73550501.be7fbc","type":"trigger-state","z":"9584418c.dafc2","name":"Rack Temperature","server":"e1dc0b88.463bb8","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"sensor.rack_exhaust_temperature","entityidfiltertype":"exact","debugenabled":false,"constraints":[],"inputs":1,"outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"num","enableInput":true,"x":190,"y":578,"wires":[["7dff3ae1.e36a04"],[]]},{"id":"7dff3ae1.e36a04","type":"switch","z":"9584418c.dafc2","name":"Above 90?","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"95","vt":"num"},{"t":"lte","v":"90","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":410,"y":578,"wires":[["29b17ed7.fab972"],["96b5207d.407dd"]]},{"id":"88822bfe.2cc598","type":"api-call-service","z":"9584418c.dafc2","name":"Turn on Fan","server":"e1dc0b88.463bb8","version":5,"domain":"homeassistant","service":"turn_on","areaId":[],"deviceId":[],"entityId":["fan.rack_fan"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":850,"y":520,"wires":[[]]},{"id":"96b5207d.407dd","type":"api-current-state","z":"9584418c.dafc2","name":"Rack Fan","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"true","halt_if_type":"bool","halt_if_compare":"is","entity_id":"fan.rack_fan","state_type":"habool","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":640,"y":598,"wires":[["c7ff978f.ff0728"],[]]},{"id":"b259f0eb.3e83","type":"api-call-service","z":"9584418c.dafc2","name":"Turn off fan","server":"e1dc0b88.463bb8","version":5,"domain":"homeassistant","service":"turn_off","areaId":[],"deviceId":[],"entityId":["fan.rack_fan"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":1090,"y":620,"wires":[[]]},{"id":"fa90c550.d6c948","type":"inject","z":"9584418c.dafc2","name":"At 8 PM","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 20 * * 1,2,4,5,6,0","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":738,"wires":[["1457bf6605a50448"]]},{"id":"e93027cb.6a6308","type":"api-current-state","z":"9584418c.dafc2","name":"Master Bedroom Lamps On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.master_bedroom_lamps","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":700,"y":740,"wires":[["fc81cfda.29ff5"],[]]},{"id":"fc81cfda.29ff5","type":"api-call-service","z":"9584418c.dafc2","name":"Set brightness to 128","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{\"brightness\":\"128\",\"transition\":5, \"entity_id\": msg.data.entity_id}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1021,"y":738,"wires":[[]]},{"id":"c7ff978f.ff0728","type":"api-current-state","z":"9584418c.dafc2","name":"Rack fan auto off?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.rack_fan_auto_off","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":870,"y":620,"wires":[["b259f0eb.3e83"],[]]},{"id":"29b17ed7.fab972","type":"api-current-state","z":"9584418c.dafc2","name":"Rack Fan","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"true","halt_if_type":"bool","halt_if_compare":"is","entity_id":"fan.rack_fan","state_type":"habool","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":640,"y":520,"wires":[[],["88822bfe.2cc598"]]},{"id":"3314ec9f.ca8994","type":"server-state-changed","z":"9584418c.dafc2","name":"Garage Opened","server":"e1dc0b88.463bb8","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"cover.garage_door","entityidfiltertype":"regex","outputinitially":false,"state_type":"str","haltifstate":"open","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":180,"y":140,"wires":[["8ec438b6.4eb2e8"],[]]},{"id":"8ee35d65.a7569","type":"api-current-state","z":"9584418c.dafc2","d":true,"name":"Kitchen Cans On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.kitchen_can_lights","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":670,"y":980,"wires":[["5420f9c0.5356c8"],[]]},{"id":"41b918d5.7ce018","type":"api-current-state","z":"9584418c.dafc2","d":true,"name":"Kitchen Table On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.kitchen_table_light","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":670,"y":1100,"wires":[["d8ad0651.bf7a18"],[]]},{"id":"5420f9c0.5356c8","type":"api-call-service","z":"9584418c.dafc2","name":"Set brightness to 40","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{\"brightness\":\"40\",\"transition\": \"5\", \"entity_id\": msg.data.entity_id}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1020,"y":880,"wires":[[]]},{"id":"77184c93.8790d4","type":"api-current-state","z":"9584418c.dafc2","d":true,"name":"Kitchen Sink On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.kitchen_sink_light","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":670,"y":920,"wires":[["5420f9c0.5356c8"],[]]},{"id":"39a5ce57.78e3d2","type":"api-current-state","z":"9584418c.dafc2","name":"Living Room Cans On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.living_room_can_lights","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":690,"y":860,"wires":[["5420f9c0.5356c8"],[]]},{"id":"5c24f744.30fcb8","type":"trigger","z":"9584418c.dafc2","name":"Wait 5m","op1":"","op2":"5","op1type":"nul","op2type":"str","duration":"5","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":640,"y":140,"wires":[["6aa388d0.707768"]]},{"id":"6aa388d0.707768","type":"api-call-service","z":"9584418c.dafc2","name":"Alexa Announce Opened","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"alexa_media","areaId":[],"deviceId":[],"entityId":[],"data":"{\"message\":\"The\" & $lowercase(msg.data.new_state.attributes.friendly_name) & \"has been opened for\" & msg.payload & \" minutes.\",\"data\":{\"method\":\"all\",\"type\":\"announce\"},\"target\":[\"Office\",\"Kitchen\",\"Master\",\"Living Room\"]}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":870,"y":160,"wires":[[]]},{"id":"cf758271.d4fd6","type":"trigger","z":"9584418c.dafc2","name":"Wait 10m","op1":"","op2":"10","op1type":"nul","op2type":"str","duration":"10","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":640,"y":180,"wires":[["6aa388d0.707768"]]},{"id":"5a740c2d.009864","type":"trigger","z":"9584418c.dafc2","name":"Wait 15m","op1":"","op2":"15","op1type":"nul","op2type":"str","duration":"15","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":640,"y":220,"wires":[["6aa388d0.707768"]]},{"id":"ea19fe14.80749","type":"api-current-state","z":"9584418c.dafc2","d":true,"name":"Entryway On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.entryway_light","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":660,"y":1040,"wires":[["5420f9c0.5356c8"],[]]},{"id":"ea2604f9.4cdf98","type":"api-current-state","z":"9584418c.dafc2","name":"Living Room Sconces On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.living_room_sconces","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":700,"y":800,"wires":[["fc81cfda.29ff5"],[]]},{"id":"8a82f465.846018","type":"comment","z":"9584418c.dafc2","name":"100% = 255","info":"","x":990,"y":811,"wires":[]},{"id":"d8ad0651.bf7a18","type":"api-call-service","z":"9584418c.dafc2","name":"Set brightness to 80","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{\"brightness\":\"80\",\"transition\": \"5\", \"entity_id\": msg.data.entity_id}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1020,"y":960,"wires":[[]]},{"id":"86bc310cbc0562af","type":"inject","z":"9584418c.dafc2","name":"At 10PM","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 23 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":1260,"wires":[["2fb6a7afb6502a32","8c55985bffebd56a"]]},{"id":"2fb6a7afb6502a32","type":"api-call-service","z":"9584418c.dafc2","name":"Front Porch Lights to 40","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.front_porch_lights"],"data":"{\"brightness\":\"40\",\"transition\":5}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":430,"y":1260,"wires":[[]]},{"id":"3f2a2e4d99057b69","type":"server-state-changed","z":"9584418c.dafc2","name":"Front Door Motion","server":"e1dc0b88.463bb8","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.front_door_motion","entityidfiltertype":"exact","outputinitially":false,"state_type":"habool","haltifstate":"true","halt_if_type":"bool","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":190,"y":1440,"wires":[["17b35d69307a8455"],[]]},{"id":"67312d79a5108126","type":"api-current-state","z":"9584418c.dafc2","name":"Front Porch On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.front_porch_lights","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":650,"y":1400,"wires":[["3e399d83e4e7f4c3"],[]]},{"id":"3e399d83e4e7f4c3","type":"api-call-service","z":"9584418c.dafc2","name":"Front Porch Lights to 254","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.front_porch_lights"],"data":"{\"brightness\":\"254\",\"transition\":2}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":910,"y":1400,"wires":[["59f5bc2571b0f12f"]]},{"id":"59f5bc2571b0f12f","type":"delay","z":"9584418c.dafc2","name":"","pauseType":"delay","timeout":"60","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":580,"y":1500,"wires":[["c68c969a6b8c2833"]]},{"id":"c68c969a6b8c2833","type":"api-call-service","z":"9584418c.dafc2","name":"Front Porch Lights to 40","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.front_porch_lights"],"data":"{\"brightness\":\"40\",\"transition\":5}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":810,"y":1500,"wires":[[]]},{"id":"d9cc182cc3eb2a93","type":"inject","z":"9584418c.dafc2","name":"At 10 PM","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 22 * * 3","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":780,"wires":[["1457bf6605a50448"]]},{"id":"b1a99d9698d831b2","type":"server-state-changed","z":"9584418c.dafc2","name":"433 Motion","server":"e1dc0b88.463bb8","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.433_front_porch_motion","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":1500,"wires":[["17b35d69307a8455","d11c183fff8d848d"]]},{"id":"17b35d69307a8455","type":"within-time-switch","z":"9584418c.dafc2","name":"","nameInt":"","positionConfig":"9f81fd881d01a666","startTime":"22:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"sunriseStart","endTimeType":"pdsTime","endOffset":"-30","endOffsetType":"num","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"withinTimeValue":"","withinTimeValueType":"msgInput","outOfTimeValue":"","outOfTimeValueType":"msgInput","tsCompare":"0","x":420,"y":1440,"wires":[["67312d79a5108126"],[]]},{"id":"d11c183fff8d848d","type":"change","z":"9584418c.dafc2","name":"Reset","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":1500,"wires":[["59f5bc2571b0f12f"]]},{"id":"a9a323de66b6f772","type":"http request","z":"9584418c.dafc2","name":"Get Aircraft","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://vrs:8080/VirtualRadar/AircraftList.json","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"Content-Type","valueType":"other","valueValue":"application/json"}],"x":410,"y":1760,"wires":[["7da69a7e8ecadc7c","91afebbf8b9edf05","4ca1a5ad47ce7a18","2cd08c8da06afaf6"]]},{"id":"ee139512bcad0966","type":"inject","z":"9584418c.dafc2","name":"Every 10 Seconds","props":[],"repeat":"10","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":210,"y":1760,"wires":[["a9a323de66b6f772"]]},{"id":"7da69a7e8ecadc7c","type":"function","z":"9584418c.dafc2","name":"Amazon","func":"var alert = {}\nvar message = \"Airborne:\\n\"\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n if (typeof msg.payload.acList[i].Reg !== \"undefined\" && typeof msg.payload.acList[i].Man !== \"undefined\") {\n if (msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n //if (msg.payload.acList[i].Reg.endsWith(\"PA\") && msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n alert[msg.payload.acList[i].Reg] = msg.payload.acList[i].Icao\n }\n }\n}\n\nif (Object.keys(alert).length > 0) {\n for (const [key, value] of Object.entries(alert)) {\n message += key + \": https://globe.adsbexchange.com/?icao=\" + value + \"\\n\"\n }\n return { payload: message + \"https://vrs.aneis.ch\" }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":580,"y":1740,"wires":[["5684b08aacd6d225"]]},{"id":"26e32b1d7824356a","type":"api-call-service","z":"9584418c.dafc2","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_adsb","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": payload \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1000,"y":1740,"wires":[[]]},{"id":"3a82b835.c57d48","type":"function","z":"9584418c.dafc2","name":"Rate Limiter","func":"var interval = (1000*60*10); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":810,"y":1680,"wires":[["26e32b1d7824356a"]]},{"id":"91afebbf8b9edf05","type":"function","z":"9584418c.dafc2","name":"Interesting Tail #","func":"var alert = {}\nvar message = \"Interesting:\\n\"\n\nvar interesting = [\"N518GS\", \"N628TS\", \"82-8000\"]\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n if (typeof msg.payload.acList[i].Reg !== \"undefined\") {\n if (interesting.includes(msg.payload.acList[i].Reg)) {\n alert[msg.payload.acList[i].Reg] = msg.payload.acList[i].Icao\n }\n }\n}\n\nif (Object.keys(alert).length > 0) {\n for (const [key, value] of Object.entries(alert)) {\n message += key + \": https://globe.adsbexchange.com/?icao=\" + value + \"\\n\"\n }\n return { payload: message + \"https://vrs.aneis.ch\" }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":600,"y":1680,"wires":[["3a82b835.c57d48"]]},{"id":"5684b08aacd6d225","type":"function","z":"9584418c.dafc2","name":"Rate Limiter","func":"var interval = (1000*60); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":810,"y":1740,"wires":[["26e32b1d7824356a"]]},{"id":"4ca1a5ad47ce7a18","type":"function","z":"9584418c.dafc2","name":"Amazon Landing","func":"var alert = {}\nvar message = \"Landing:\\n\"\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n if (typeof msg.payload.acList[i].Reg !== \"undefined\" && typeof msg.payload.acList[i].Man !== \"undefined\") {\n //if (msg.payload.acList[i].Reg.endsWith(\"PA\") && msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n if (msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n if (msg.payload.acList[i].Alt < 50){\n alert[msg.payload.acList[i].Reg] = msg.payload.acList[i].Icao\n }\n }\n }\n}\n\nif (Object.keys(alert).length > 0) {\n for (const [key, value] of Object.entries(alert)) {\n message += key + \": https://globe.adsbexchange.com/?icao=\" + value + \"\\n\"\n }\n return { payload: message + \"https://vrs.aneis.ch\" }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":610,"y":1800,"wires":[["ba68e03143ba4af8"]]},{"id":"ba68e03143ba4af8","type":"function","z":"9584418c.dafc2","name":"Rate Limiter","func":"var interval = (1000*60); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":810,"y":1800,"wires":[["26e32b1d7824356a"]]},{"id":"5f1d1b471a1c7cbb","type":"sqlite","z":"9584418c.dafc2","mydb":"4f8f8feffed26998","sqlquery":"msg.topic","sql":"","name":"Amazon","x":800,"y":1860,"wires":[["ea911291f04c7d18"]]},{"id":"2cd08c8da06afaf6","type":"function","z":"9584418c.dafc2","name":"Write Amazon Landing","func":"var sql = \"\"\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n var latlong = \"0,0\"\n if (typeof msg.payload.acList[i].Reg !== \"undefined\" && typeof msg.payload.acList[i].Lat !== \"undefined\" && typeof msg.payload.acList[i].Long !== \"undefined\") {\n //if (msg.payload.acList[i].Reg.endsWith(\"PA\") && msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n if (msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n if (msg.payload.acList[i].Alt < 50){\n latlong = msg.payload.acList[i].Lat + \",\" + msg.payload.acList[i].Long.toString()\n sql += `INSERT INTO deliveries (timestamp, registration, latlong, altitude) VALUES (\"${Date.now()}\", \"${msg.payload.acList[i].Reg}\", \"${latlong}\", \"${msg.payload.acList[i].Alt}\"); `\n }\n }\n }\n}\n\nif (sql.length > 0){\n msg.topic = sql\n return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":620,"y":1860,"wires":[["5f1d1b471a1c7cbb"]]},{"id":"ea911291f04c7d18","type":"api-call-service","z":"9584418c.dafc2","name":"Generate Heatmap","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"shell_command","service":"generate_heatmap","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1010,"y":1860,"wires":[[]]},{"id":"cde7b3c9ca39891b","type":"link in","z":"9584418c.dafc2","name":"","links":["1457bf6605a50448"],"x":345,"y":760,"wires":[["e93027cb.6a6308","ea2604f9.4cdf98","39a5ce57.78e3d2","77184c93.8790d4","8ee35d65.a7569","ea19fe14.80749","41b918d5.7ce018"]]},{"id":"1457bf6605a50448","type":"link out","z":"9584418c.dafc2","name":"","links":["cde7b3c9ca39891b"],"x":315,"y":760,"wires":[]},{"id":"8c55985bffebd56a","type":"api-call-service","z":"9584418c.dafc2","name":"Front Sconces Off","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.front_sconces"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":410,"y":1200,"wires":[[]]},{"id":"fae7fa701710e258","type":"server-state-changed","z":"9584418c.dafc2","name":"Front Door Unlock","server":"e1dc0b88.463bb8","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"lock.front_door","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"unlocked","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":190,"y":1380,"wires":[["17b35d69307a8455"],[]]},{"id":"54bad548.7e9fcc","type":"ha-get-entities","z":"f602e6ba.609d28","name":"Get \"On\" Sprinklers","server":"e1dc0b88.463bb8","version":0,"rules":[{"property":"entity_id","logic":"starts_with","value":"switch.irrigation","valueType":"str"},{"property":"entity_id","logic":"does_not_include","value":"switch.irrigation_master_valve,switch.irrigation_24v_power,switch.irrigation_drip","valueType":"str"},{"property":"state","logic":"is","value":"on","valueType":"str"}],"output_type":"array","output_empty_results":true,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":370,"y":100,"wires":[["bcbf413e.7b188"]]},{"id":"5a10cd93.8e94b4","type":"inject","z":"f602e6ba.609d28","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":true,"onceDelay":0.1,"topic":"","payloadType":"date","x":150,"y":100,"wires":[["54bad548.7e9fcc"]]},{"id":"a77808ff.3f1288","type":"switch","z":"f602e6ba.609d28","name":"On Longer than 26 minutes?","property":"payload[0].timeSinceChangedMs","propertyType":"msg","rules":[{"t":"gte","v":"1600000","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":700,"y":60,"wires":[["54ae6ec3.1bc63"]]},{"id":"54ae6ec3.1bc63","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn Off Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload[0].entity_id }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":960,"y":60,"wires":[[]]},{"id":"bcbf413e.7b188","type":"switch","z":"f602e6ba.609d28","name":"More Than 0 Entities?","property":"payload","propertyType":"msg","rules":[{"t":"nempty"},{"t":"empty"}],"checkall":"true","repair":false,"outputs":2,"x":380,"y":160,"wires":[["a77808ff.3f1288","3b848bce.76aea4"],["c42e6d62.7a24c"]]},{"id":"3b848bce.76aea4","type":"change","z":"f602e6ba.609d28","name":"Reset Delay","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":650,"y":100,"wires":[["cdd3b7ef.04a618"]]},{"id":"43dedcca.ac7734","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn Off Master","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.irrigation_master_valve"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1460,"y":180,"wires":[[]]},{"id":"b4335c36.09adb","type":"comment","z":"f602e6ba.609d28","name":"Set Auto-Off for Sprinkler","info":"","x":250,"y":40,"wires":[]},{"id":"c42e6d62.7a24c","type":"api-current-state","z":"f602e6ba.609d28","name":"Master On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.irrigation_master_valve","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":650,"y":160,"wires":[["cdd3b7ef.04a618"],["3b848bce.76aea4"]]},{"id":"d269f175.c9dc6","type":"server-events","z":"f602e6ba.609d28","name":"Custom Water Event Fired","server":"e1dc0b88.463bb8","version":2,"eventType":"irrigation_custom_water","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"},{"property":"event_type","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"}],"x":170,"y":320,"wires":[["883f2c00.1d94e8"]]},{"id":"3367e45f.cc981c","type":"function","z":"f602e6ba.609d28","name":"++","func":"if ( (msg.i += 1) < msg.zones.length ) return msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":650,"y":380,"wires":[["116d5bb3.ee92a4"]]},{"id":"116d5bb3.ee92a4","type":"function","z":"f602e6ba.609d28","name":"For Each","func":"if( msg.i == undefined ) msg.i = 0;\n\nmsg.payload = msg.zones[ msg.i ];\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":820,"y":320,"wires":[["565ee5c1.561bfc","80df47d5.602888","e2c37b65c5582c2b"]]},{"id":"80df47d5.602888","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn On Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1040,"y":320,"wires":[[]]},{"id":"fb46876c.845298","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn Off Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1300,"y":380,"wires":[["98eeafa7.bd2b9","860a4c61d7557dc9"]]},{"id":"98eeafa7.bd2b9","type":"delay","z":"f602e6ba.609d28","name":"Delay 5","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":960,"y":460,"wires":[["3367e45f.cc981c"]]},{"id":"7c3d09ca.229958","type":"comment","z":"f602e6ba.609d28","name":"Fired From HA Python Script or Automation","info":"","x":310,"y":260,"wires":[]},{"id":"565ee5c1.561bfc","type":"change","z":"f602e6ba.609d28","name":"Set Delay Variable","rules":[{"t":"set","p":"delay","pt":"msg","to":"payload.time* 60000","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":380,"wires":[["22a20603.86a06a"]]},{"id":"22a20603.86a06a","type":"stoptimer-varidelay","z":"f602e6ba.609d28","duration":"5","durationType":"num","units":"Millisecond","payloadtype":"num","payloadval":"0","name":"Delay","reporting":"every_second","persist":false,"x":1070,"y":380,"wires":[["fb46876c.845298"],[],["a8d96e.1f00969"]]},{"id":"a8d96e.1f00969","type":"mqtt out","z":"f602e6ba.609d28","name":"Publish Time Remaining","topic":"sensor/irrigation_time_remaining","qos":"","retain":"","broker":"546e31ed.0db1c","x":1330,"y":320,"wires":[]},{"id":"cdd3b7ef.04a618","type":"trigger","z":"f602e6ba.609d28","name":"Wait 1m","op1":"","op2":"0","op1type":"nul","op2type":"str","duration":"1","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":860,"y":120,"wires":[["5e9007a27732bba9"]]},{"id":"3b838f49.e10c","type":"comment","z":"f602e6ba.609d28","name":"Garden Drip - Bib timer start 7:58 and runs for 55 min","info":"","x":300,"y":540,"wires":[]},{"id":"3b656b89.1ac154","type":"inject","z":"f602e6ba.609d28","name":"5:00 Attempt","props":[{"p":"payload"}],"repeat":"","crontab":"00 05 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"zone\":\"switch.irrigation_front_beds\",\"time\":10,\"name\":\"Front beds\"},{\"zone\":\"switch.irrigation_front_lawn\",\"time\":20,\"name\":\"Front lawn\"},{\"zone\":\"switch.irrigation_left_and_main_rear_lawn\",\"time\":20,\"name\":\"Left and main rear lawn\"},{\"zone\":\"switch.irrigation_front_and_right_rear_lawn\",\"time\":20,\"name\":\"Front and right rear lawn\"},{\"zone\":\"switch.irrigation_side_lawn\",\"time\":20,\"name\":\"Side lawn\"}]","payloadType":"json","x":160,"y":760,"wires":[["493b435f.c9851c"]]},{"id":"fdb6234.55064e","type":"function","z":"f602e6ba.609d28","name":"++","func":"if ( (msg.i += 1) < msg.zones.length ) return msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":290,"y":1680,"wires":[["857c8b4f.d19808"]]},{"id":"857c8b4f.d19808","type":"function","z":"f602e6ba.609d28","name":"For Each","func":"if( msg.i == undefined ) msg.i = 0;\n\nmsg.payload = msg.zones[ msg.i ];\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":300,"y":1620,"wires":[["5ebabb53.f9e834"]]},{"id":"a60b0459.b34598","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn On Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1160,"y":1620,"wires":[["12f649bd.98f9f6"]]},{"id":"a082bd08.49c44","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn Off Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":820,"y":1800,"wires":[["6c216ad5.e58054"]]},{"id":"6c216ad5.e58054","type":"delay","z":"f602e6ba.609d28","name":"Delay 10","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":480,"y":1740,"wires":[["fdb6234.55064e"]]},{"id":"12f649bd.98f9f6","type":"change","z":"f602e6ba.609d28","name":"Set Delay Variable","rules":[{"t":"set","p":"delay","pt":"msg","to":"payload.time* 60000","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":830,"y":1680,"wires":[["d029ec72.ae401"]]},{"id":"5eaebc41.9491c4","type":"switch","z":"f602e6ba.609d28","name":"Last Ran >= Template Hrs Ago","property":"data.continue","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":1680,"wires":[["b7ac1681.a64af8"],["fdb6234.55064e"]]},{"id":"a9b82dcc.1843e","type":"api-render-template","z":"f602e6ba.609d28","name":"Evaluate Template","server":"e1dc0b88.463bb8","version":0,"template":"","resultsLocation":"data.continue","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":830,"y":1560,"wires":[["a298ba43aff58e18"]]},{"id":"5ebabb53.f9e834","type":"template","z":"f602e6ba.609d28","name":"Template: Zone Last Ran >= 71 hours","field":"template","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{%- set entity_name = \"input_datetime{{ payload.zone }}\" | regex_replace(find='switch', replace='', ignorecase=False) -%}\n{%- set time = (as_timestamp(now()) - as_timestamp(states(entity_name+\"_last_start\"))) | int -%}\n{% if time >= 71*3600 %}1{% else %}0{% endif %}","output":"str","x":530,"y":1560,"wires":[["a9b82dcc.1843e"]]},{"id":"b7ac1681.a64af8","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn On Master Valve","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_master_valve"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":840,"y":1620,"wires":[["3c20bed9.9f3812"]]},{"id":"d029ec72.ae401","type":"stoptimer-varidelay","z":"f602e6ba.609d28","duration":"5","durationType":"num","units":"Millisecond","payloadtype":"num","payloadval":"0","name":"Delay","reporting":"every_second","persist":false,"ignoretimerpass":false,"x":790,"y":1740,"wires":[["a082bd08.49c44","8a25411f.1fe15"],[],["df183b71.5ccca8"]]},{"id":"df183b71.5ccca8","type":"mqtt out","z":"f602e6ba.609d28","name":"Publish Time Remaining","topic":"sensor/irrigation_time_remaining","qos":"","retain":"","broker":"546e31ed.0db1c","x":1070,"y":1760,"wires":[]},{"id":"da687baa.d8ed88","type":"api-call-service","z":"f602e6ba.609d28","name":"Notify via Wrapper","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": alert \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1270,"y":1720,"wires":[[]]},{"id":"8a25411f.1fe15","type":"function","z":"f602e6ba.609d28","name":"Create msg object","func":"var message = \"Sprinkler auto-run: \" + msg.payload.name + \" ran for \" + msg.payload.time + \" minutes\"\n\nreturn { alert: message };","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1050,"y":1720,"wires":[["da687baa.d8ed88"]]},{"id":"3c20bed9.9f3812","type":"delay","z":"f602e6ba.609d28","name":"2s","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":1010,"y":1620,"wires":[["a60b0459.b34598"]]},{"id":"493b435f.c9851c","type":"api-current-state","z":"f602e6ba.609d28","name":"Schedule Enabled","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.lawn_irrigation_scheduling","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":390,"y":760,"wires":[["8c060f00.cf577"],["7b12e66f.57d068"]]},{"id":"9f3dd0a4.22c76","type":"api-get-history","z":"f602e6ba.609d28","name":"Rainfall 48h","server":"e1dc0b88.463bb8","version":0,"startdate":"","enddate":"","entityid":"sensor.netatmo_home_rain_sum_rain_today_inches","entityidtype":"is","useRelativeTime":true,"relativeTime":"48h","flatten":true,"output_type":"array","output_location_type":"msg","output_location":"payload","x":230,"y":960,"wires":[["3b42f047.f6721"]]},{"id":"3b42f047.f6721","type":"function","z":"f602e6ba.609d28","name":"Check Rainfall","func":"var rain_override = false\n\nfor (var i = 0; i < msg.payload.length; i++) {\n if (parseFloat(msg.payload[i].state) > 0.10) {\n rain_override = true\n }\n}\n\n// top = proceed\n// bottom = overridden\nif (rain_override === true) {\n return [ null, {rain_override} ];\n} \nelse {\n return [ {rain_override}, null ];\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":420,"y":960,"wires":[["dcdeabc7.780578"],["773941a7.152da"]]},{"id":"773941a7.152da","type":"api-call-service","z":"f602e6ba.609d28","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"setter","service":"set","areaId":[],"deviceId":[],"entityId":["sensor.sprinker_interrupt_reason"],"data":"{ \"state\": \"Rainfall\", \"attributes\": {\"friendly_name\":\"Sprinkler Reason\", \"icon\":\"mdi:weather-lightning-rainy\"}}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":610,"y":1000,"wires":[[]]},{"id":"7b12e66f.57d068","type":"api-call-service","z":"f602e6ba.609d28","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"setter","service":"set","areaId":[],"deviceId":[],"entityId":["sensor.sprinker_interrupt_reason"],"data":"{ \"state\": \"Automation Off\", \"attributes\": {\"friendly_name\":\"Sprinkler Reason\", \"icon\":\"mdi:cancel\"}}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":610,"y":800,"wires":[[]]},{"id":"8c060f00.cf577","type":"link out","z":"f602e6ba.609d28","name":"","links":["f1cbfe0.7dfb4","576b66fa1bd202a3"],"x":575,"y":740,"wires":[]},{"id":"3290b2c2.62032e","type":"api-call-service","z":"f602e6ba.609d28","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"setter","service":"set","areaId":[],"deviceId":[],"entityId":["sensor.sprinker_interrupt_reason"],"data":"{ \"state\": \"Rain Chance\", \"attributes\": {\"friendly_name\":\"Sprinkler Reason\", \"icon\":\"mdi:weather-lightning-rainy\"}}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":610,"y":1120,"wires":[[]]},{"id":"4422f61c.847d88","type":"link in","z":"f602e6ba.609d28","name":"","links":["3ff9ce03ef7b554b"],"x":115,"y":960,"wires":[["9f3dd0a4.22c76"]]},{"id":"dcdeabc7.780578","type":"link out","z":"f602e6ba.609d28","name":"","links":["1eaa857e.b6b8db","c90fd5e6.c5c678"],"x":575,"y":940,"wires":[]},{"id":"722d03d6.2ff77c","type":"link in","z":"f602e6ba.609d28","name":"","links":["8d4bfe8e.ee805","d67106b42368e630"],"x":115,"y":1400,"wires":[["d40b6c7e.af78d"]]},{"id":"af4788fe.215ba8","type":"link out","z":"f602e6ba.609d28","name":"","links":["405789f7.0727a8"],"x":575,"y":1420,"wires":[]},{"id":"405789f7.0727a8","type":"link in","z":"f602e6ba.609d28","name":"","links":["db46e0c1.f9ab5","af4788fe.215ba8"],"x":75,"y":1560,"wires":[["9941ac76.663b1"]]},{"id":"9941ac76.663b1","type":"template","z":"f602e6ba.609d28","name":"Zone Settings Lawn","field":"zones","fieldType":"msg","format":"json","syntax":"mustache","template":"[\n {\n \"zone\": \"switch.irrigation_front_lawn\",\n \"time\": 25,\n \"name\": \"Front lawn\"\n },\n {\n \"zone\": \"switch.irrigation_left_and_main_rear_lawn\",\n \"time\": 25,\n \"name\": \"Left and main rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_front_and_right_rear_lawn\",\n \"time\": 25,\n \"name\": \"Front and right rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_side_lawn\",\n \"time\": 20,\n \"name\": \"Side lawn\"\n }\n]","output":"json","x":220,"y":1560,"wires":[["857c8b4f.d19808"]]},{"id":"5933da9a.d9f024","type":"comment","z":"f602e6ba.609d28","name":"Scheduled Sprinklers -- Run Lawn Zones","info":"","x":300,"y":1520,"wires":[]},{"id":"c90fd5e6.c5c678","type":"link in","z":"f602e6ba.609d28","name":"","links":["dcdeabc7.780578"],"x":115,"y":1080,"wires":[["870d9d95.e93ce"]]},{"id":"862ad27a.d347d","type":"link out","z":"f602e6ba.609d28","name":"","links":["83edf648.3f9ed8"],"x":575,"y":1060,"wires":[]},{"id":"870d9d95.e93ce","type":"api-current-state","z":"f602e6ba.609d28","name":"Weather","server":"e1dc0b88.463bb8","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"weather.kcll_daynight","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":220,"y":1080,"wires":[["21d9168d.46ef5a"]]},{"id":"21d9168d.46ef5a","type":"function","z":"f602e6ba.609d28","name":"Rain Chance","func":"// Check next 4 precipitation_probability values\n// HA Template: \n// {% for j in state_attr(\"weather.kcll_daynight\",\"forecast\")[:4] %}\n// {{ j.precipitation_probability }}\n// {% endfor %}\n\nvar forecast_override = false\n\n// if (parseFloat(msg.payload) > 40) {\n// forecast_override = true\n// }\n \nfor (var i = 0; i < 4; i++) {\n if (parseFloat(msg.data.attributes.forecast[i].precipitation_probability) > 40) {\n forecast_override = true\n }\n}\n\n// top = proceed\n// bottom = overridden\nif (forecast_override === true) {\n return [ null, {forecast_override} ];\n} \nelse {\n return [ {forecast_override}, null ];\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":410,"y":1080,"wires":[["862ad27a.d347d"],["3290b2c2.62032e"]]},{"id":"808e6a81.92e2e8","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn On Master Valve","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_master_valve"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":440,"y":380,"wires":[["e42ff3d9.593dc"]]},{"id":"883f2c00.1d94e8","type":"api-current-state","z":"f602e6ba.609d28","name":"24v Power","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.irrigation_24v_power","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":230,"y":380,"wires":[["808e6a81.92e2e8"],[]]},{"id":"e42ff3d9.593dc","type":"delay","z":"f602e6ba.609d28","name":"Delay 5","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":460,"y":320,"wires":[["76160bc4.8cd644"]]},{"id":"76160bc4.8cd644","type":"change","z":"f602e6ba.609d28","name":"","rules":[{"t":"set","p":"zones","pt":"msg","to":"payload.event.zones","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":320,"wires":[["116d5bb3.ee92a4"]]},{"id":"499b8bfb.3152a4","type":"api-call-service","z":"f602e6ba.609d28","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"setter","service":"set","areaId":[],"deviceId":[],"entityId":["sensor.sprinker_interrupt_reason"],"data":"{\"state\":\"Too Windy\",\"attributes\":{\"friendly_name\":\"Sprinkler Reason\",\"icon\":\"mdi:weather-windy\"}}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":610,"y":1320,"wires":[[]]},{"id":"83edf648.3f9ed8","type":"link in","z":"f602e6ba.609d28","name":"","links":["862ad27a.d347d"],"x":115,"y":1200,"wires":[["2720fe53.e6c2d2"]]},{"id":"8d4bfe8e.ee805","type":"link out","z":"f602e6ba.609d28","name":"","links":["722d03d6.2ff77c"],"x":575,"y":1180,"wires":[]},{"id":"2720fe53.e6c2d2","type":"api-current-state","z":"f602e6ba.609d28","name":"Wind <= 10 MPH","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"10","halt_if_type":"num","halt_if_compare":"lte","entity_id":"sensor.nws_wind_speed","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":250,"y":1200,"wires":[["8d4bfe8e.ee805"],["a3d75225807b70eb"]]},{"id":"70dfaa6a.be6a74","type":"inject","z":"f602e6ba.609d28","name":"08:00","props":[{"p":"payload"}],"repeat":"","crontab":"00 08 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"zone\":\"switch.irrigation_front_beds\",\"time\":10,\"name\":\"Front beds\"},{\"zone\":\"switch.irrigation_front_lawn\",\"time\":20,\"name\":\"Front lawn\"},{\"zone\":\"switch.irrigation_left_and_main_rear_lawn\",\"time\":20,\"name\":\"Left and main rear lawn\"},{\"zone\":\"switch.irrigation_front_and_right_rear_lawn\",\"time\":20,\"name\":\"Front and right rear lawn\"},{\"zone\":\"switch.irrigation_side_lawn\",\"time\":20,\"name\":\"Side lawn\"}]","payloadType":"json","x":140,"y":580,"wires":[["c05e6454.2f85b8"]]},{"id":"c05e6454.2f85b8","type":"api-current-state","z":"f602e6ba.609d28","name":"Drip Irrigation Enabled","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.drip_irrigation_scheduling","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":320,"y":580,"wires":[["3461c5c.34e3d3a"],[]]},{"id":"3461c5c.34e3d3a","type":"api-call-service","z":"f602e6ba.609d28","name":"On","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_drip"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":490,"y":580,"wires":[["293b659b.8348ea"]]},{"id":"acd1bab8.aee3d8","type":"api-call-service","z":"f602e6ba.609d28","name":"Off","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.irrigation_drip"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":730,"y":580,"wires":[["c68eb12d.9599a"]]},{"id":"293b659b.8348ea","type":"delay","z":"f602e6ba.609d28","name":"50 Min","pauseType":"delay","timeout":"50","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":610,"y":580,"wires":[["acd1bab8.aee3d8"]]},{"id":"b60d2f74.cc7f6","type":"api-call-service","z":"f602e6ba.609d28","name":"On","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_drip"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":970,"y":580,"wires":[["da67a902.f7ef48"]]},{"id":"ed0380b5.fa017","type":"api-call-service","z":"f602e6ba.609d28","name":"Off","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.irrigation_drip"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1210,"y":580,"wires":[[]]},{"id":"da67a902.f7ef48","type":"delay","z":"f602e6ba.609d28","name":"5 Sec","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":1090,"y":580,"wires":[["ed0380b5.fa017"]]},{"id":"c68eb12d.9599a","type":"delay","z":"f602e6ba.609d28","name":"10 Min","pauseType":"delay","timeout":"10","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":850,"y":580,"wires":[["b60d2f74.cc7f6"]]},{"id":"b76b5030.7d402","type":"comment","z":"f602e6ba.609d28","name":"Release Pressure","info":"","x":900,"y":540,"wires":[]},{"id":"edc724f1.d2e458","type":"comment","z":"f602e6ba.609d28","name":"Lawn Attempt","info":"","x":170,"y":680,"wires":[]},{"id":"583f46a3.fc4c38","type":"inject","z":"f602e6ba.609d28","name":"8:00 Attempt","props":[{"p":"payload"}],"repeat":"","crontab":"00 08 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"zone\":\"switch.irrigation_front_beds\",\"time\":10,\"name\":\"Front beds\"},{\"zone\":\"switch.irrigation_front_lawn\",\"time\":20,\"name\":\"Front lawn\"},{\"zone\":\"switch.irrigation_left_and_main_rear_lawn\",\"time\":20,\"name\":\"Left and main rear lawn\"},{\"zone\":\"switch.irrigation_front_and_right_rear_lawn\",\"time\":20,\"name\":\"Front and right rear lawn\"},{\"zone\":\"switch.irrigation_side_lawn\",\"time\":20,\"name\":\"Side lawn\"}]","payloadType":"json","x":820,"y":740,"wires":[["d9147878.b61cf8"]]},{"id":"d9147878.b61cf8","type":"api-current-state","z":"f602e6ba.609d28","name":"Schedule Enabled","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.lawn_irrigation_scheduling","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":1050,"y":740,"wires":[["c7e5552e.7f8a08"],[]]},{"id":"804ab203.434e4","type":"api-get-history","z":"f602e6ba.609d28","name":"Rainfall 24h","server":"e1dc0b88.463bb8","version":0,"startdate":"","enddate":"","entityid":"sensor.netatmo_home_rain_sum_rain_today_inches","entityidtype":"is","useRelativeTime":true,"relativeTime":"24h","flatten":true,"output_type":"array","output_location_type":"msg","output_location":"payload","x":890,"y":1080,"wires":[["c50a5938.e47538"]]},{"id":"c50a5938.e47538","type":"function","z":"f602e6ba.609d28","name":"Check Rainfall","func":"var rain_override = false\n\nfor (var i = 0; i < msg.payload.length; i++) {\n if (parseFloat(msg.payload[i].state) > 0.10) {\n rain_override = true\n }\n}\n\n// top = proceed\n// bottom = overridden\nif (rain_override === true) {\n return [ null, {rain_override} ];\n} \nelse {\n return [ {rain_override}, null ];\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1080,"y":1080,"wires":[["f587589f.d739e8"],[]]},{"id":"c7e5552e.7f8a08","type":"link out","z":"f602e6ba.609d28","name":"","links":["f1cbfe0.7dfb4","f6881b4bf93c27c5"],"x":1235,"y":740,"wires":[]},{"id":"6bcf06fb.9ca748","type":"link in","z":"f602e6ba.609d28","name":"","links":["4f2902edc77f2d3b"],"x":775,"y":1080,"wires":[["804ab203.434e4"]]},{"id":"f587589f.d739e8","type":"link out","z":"f602e6ba.609d28","name":"","links":["1eaa857e.b6b8db","9d851699.6a8458"],"x":1235,"y":1080,"wires":[]},{"id":"d9d17e8f.590e6","type":"link in","z":"f602e6ba.609d28","name":"","links":["4fae5b92.a9cd44","fdcfa1521191fa40"],"x":775,"y":1440,"wires":[["418058c4.af3158"]]},{"id":"d9f893eb.834f3","type":"link out","z":"f602e6ba.609d28","name":"","links":["5ce1803b.06628"],"x":1235,"y":1440,"wires":[]},{"id":"9d851699.6a8458","type":"link in","z":"f602e6ba.609d28","name":"","links":["f587589f.d739e8"],"x":775,"y":1200,"wires":[["c3279051.91a85"]]},{"id":"760894e3.db2a9c","type":"link out","z":"f602e6ba.609d28","name":"","links":["ceef2a94.9378c8"],"x":1235,"y":1200,"wires":[]},{"id":"c3279051.91a85","type":"api-current-state","z":"f602e6ba.609d28","name":"Weather","server":"e1dc0b88.463bb8","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"weather.kcll_daynight","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":880,"y":1200,"wires":[["20b5172c.13dd58"]]},{"id":"20b5172c.13dd58","type":"function","z":"f602e6ba.609d28","name":"Rain Chance","func":"// Check next 4 precipitation_probability values\n// HA Template: \n// {% for j in state_attr(\"weather.kcll_daynight\",\"forecast\")[:4] %}\n// {{ j.precipitation_probability }}\n// {% endfor %}\n\nvar forecast_override = false\n\n// if (parseFloat(msg.payload) > 40) {\n// forecast_override = true\n// }\n\nfor (var i = 0; i < 4; i++) {\n if (parseFloat(msg.data.attributes.forecast[i].precipitation_probability) > 40) {\n forecast_override = true\n }\n}\n\n// top = proceed\n// bottom = overridden\nif (forecast_override === true) {\n return [ null, {forecast_override} ];\n} \nelse {\n return [ {forecast_override}, null ];\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1070,"y":1200,"wires":[["760894e3.db2a9c"],[]]},{"id":"ceef2a94.9378c8","type":"link in","z":"f602e6ba.609d28","name":"","links":["760894e3.db2a9c"],"x":775,"y":1320,"wires":[["2bf89956.475926"]]},{"id":"4fae5b92.a9cd44","type":"link out","z":"f602e6ba.609d28","name":"","links":["d9d17e8f.590e6"],"x":1235,"y":1320,"wires":[]},{"id":"2bf89956.475926","type":"api-current-state","z":"f602e6ba.609d28","name":"Wind <= 10 MPH","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"10","halt_if_type":"num","halt_if_compare":"lte","entity_id":"sensor.nws_wind_speed","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":910,"y":1320,"wires":[["4fae5b92.a9cd44"],[]]},{"id":"aaacee72.fc35a","type":"comment","z":"f602e6ba.609d28","name":"Front Beds Attempt","info":"","x":850,"y":680,"wires":[]},{"id":"a2ab7368.923fb","type":"template","z":"f602e6ba.609d28","name":"Zone Settings Front Beds","field":"zones","fieldType":"msg","format":"json","syntax":"mustache","template":"{\n \"zone\": \"switch.irrigation_front_beds\",\n \"time\": 15,\n \"name\": \"Front beds\"\n}","output":"json","x":230,"y":1880,"wires":[["62b5545bc6d6e627"]]},{"id":"a31e3daf.17207","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn On Master Valve","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_master_valve"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":540,"y":1880,"wires":[["21ced698.708b5a"]]},{"id":"21ced698.708b5a","type":"delay","z":"f602e6ba.609d28","name":"2s","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":710,"y":1880,"wires":[["c661d489.9c9bc8"]]},{"id":"c661d489.9c9bc8","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn On Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": msg.zones.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":860,"y":1880,"wires":[["accc6697.196268"]]},{"id":"accc6697.196268","type":"change","z":"f602e6ba.609d28","name":"Set Delay Variable","rules":[{"t":"set","p":"delay","pt":"msg","to":"msg.zones.time* 60000","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1070,"y":1880,"wires":[["487ff788.8c5c98"]]},{"id":"487ff788.8c5c98","type":"stoptimer-varidelay","z":"f602e6ba.609d28","duration":"5","durationType":"num","units":"Millisecond","payloadtype":"num","payloadval":"0","name":"Delay","reporting":"every_second","persist":false,"ignoretimerpass":false,"x":830,"y":1940,"wires":[["2238b09b.1b5b5","9129b06e.d8925"],[],["84258ddd.41da4"]]},{"id":"2238b09b.1b5b5","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn Off Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": msg.zones.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":880,"y":2020,"wires":[[]]},{"id":"84258ddd.41da4","type":"mqtt out","z":"f602e6ba.609d28","name":"Publish Time Remaining","topic":"sensor/irrigation_time_remaining","qos":"","retain":"","broker":"546e31ed.0db1c","x":1110,"y":2000,"wires":[]},{"id":"9129b06e.d8925","type":"function","z":"f602e6ba.609d28","name":"Create msg object","func":"var message = \"Sprinkler auto-run: \" + msg.zones.name + \" ran for \" + msg.zones.time + \" minutes\"\n\nreturn { alert: message };","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1030,"y":1940,"wires":[["d83b5ff7a2212931"]]},{"id":"5ce1803b.06628","type":"link in","z":"f602e6ba.609d28","name":"","links":["db46e0c1.f9ab5","d9f893eb.834f3"],"x":75,"y":1880,"wires":[["a2ab7368.923fb"]]},{"id":"2afa6b1a.8012b4","type":"comment","z":"f602e6ba.609d28","name":"Scheduled Sprinklers -- Run Front Beds","info":"","x":290,"y":1840,"wires":[]},{"id":"815fddc0.6604c","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn On 24v","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_24v_power"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":450,"y":1420,"wires":[["af4788fe.215ba8"]]},{"id":"418058c4.af3158","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn On 24v","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_24v_power"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":890,"y":1440,"wires":[["d9f893eb.834f3"]]},{"id":"1ae21386.a831bc","type":"inject","z":"f602e6ba.609d28","name":"10:00 24v Off","props":[],"repeat":"","crontab":"00 10 * * *","once":false,"onceDelay":0.1,"topic":"","x":820,"y":840,"wires":[["117145a7.67e99a","882aff35f788008b"]]},{"id":"117145a7.67e99a","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn Off 24v","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.irrigation_24v_power"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1030,"y":800,"wires":[[]]},{"id":"d40b6c7e.af78d","type":"api-call-service","z":"f602e6ba.609d28","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"setter","service":"set","areaId":[],"deviceId":[],"entityId":["sensor.sprinker_interrupt_reason"],"data":"{\"state\":\"None\",\"attributes\":{\"friendly_name\":\"Sprinkler Reason\",\"icon\":\"mdi:check\"}}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":270,"y":1380,"wires":[["815fddc0.6604c"]]},{"id":"63f07877e73b952a","type":"switch","z":"f602e6ba.609d28","name":"More Than 0 Entities?","property":"payload","propertyType":"msg","rules":[{"t":"nempty"},{"t":"empty"}],"checkall":"true","repair":false,"outputs":2,"x":1080,"y":180,"wires":[[],["749afd72791a5127"]]},{"id":"5e9007a27732bba9","type":"ha-get-entities","z":"f602e6ba.609d28","name":"Get \"On\" Sprinklers","server":"e1dc0b88.463bb8","version":0,"rules":[{"property":"entity_id","logic":"starts_with","value":"switch.irrigation","valueType":"str"},{"property":"entity_id","logic":"does_not_include","value":"switch.irrigation_master_valve,switch.irrigation_24v_power","valueType":"str"},{"property":"state","logic":"is","value":"on","valueType":"str"}],"output_type":"array","output_empty_results":true,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":1050,"y":120,"wires":[["63f07877e73b952a"]]},{"id":"06d6255efdc31c47","type":"api-current-state","z":"f602e6ba.609d28","name":"Force Run","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_force_run","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":230,"y":860,"wires":[["5420d0eed32223fb"],["3ff9ce03ef7b554b"]]},{"id":"5420d0eed32223fb","type":"link out","z":"f602e6ba.609d28","name":"","links":["f1cbfe0.7dfb4","08e3098cf183e086"],"x":475,"y":840,"wires":[]},{"id":"3ff9ce03ef7b554b","type":"link out","z":"f602e6ba.609d28","name":"","links":["f1cbfe0.7dfb4","4422f61c.847d88"],"x":475,"y":880,"wires":[]},{"id":"576b66fa1bd202a3","type":"link in","z":"f602e6ba.609d28","name":"","links":["8c060f00.cf577"],"x":115,"y":860,"wires":[["06d6255efdc31c47"]]},{"id":"7350c911a0b1a86d","type":"api-current-state","z":"f602e6ba.609d28","name":"Force Run","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_force_run","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":890,"y":960,"wires":[["fdcfa1521191fa40"],["4f2902edc77f2d3b"]]},{"id":"fdcfa1521191fa40","type":"link out","z":"f602e6ba.609d28","name":"","links":["f1cbfe0.7dfb4","d9d17e8f.590e6"],"x":1235,"y":920,"wires":[]},{"id":"4f2902edc77f2d3b","type":"link out","z":"f602e6ba.609d28","name":"","links":["f1cbfe0.7dfb4","6bcf06fb.9ca748"],"x":1235,"y":980,"wires":[]},{"id":"f6881b4bf93c27c5","type":"link in","z":"f602e6ba.609d28","name":"","links":["c7e5552e.7f8a08"],"x":775,"y":960,"wires":[["7350c911a0b1a86d"]]},{"id":"9ebfc0893b208a38","type":"api-call-service","z":"f602e6ba.609d28","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"setter","service":"set","areaId":[],"deviceId":[],"entityId":["sensor.sprinker_interrupt_reason"],"data":"{\"state\":\"Force Run\",\"attributes\":{\"friendly_name\":\"Sprinkler Reason\",\"icon\":\"mdi:check\"}}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":270,"y":1460,"wires":[["815fddc0.6604c"]]},{"id":"08e3098cf183e086","type":"link in","z":"f602e6ba.609d28","name":"","links":["5420d0eed32223fb"],"x":115,"y":1440,"wires":[["9ebfc0893b208a38"]]},{"id":"882aff35f788008b","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn Off Force Run","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_force_run"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1050,"y":860,"wires":[[]]},{"id":"a298ba43aff58e18","type":"api-current-state","z":"f602e6ba.609d28","name":"Force Run","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_force_run","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":550,"y":1620,"wires":[["b7ac1681.a64af8"],["5eaebc41.9491c4"]]},{"id":"8f026440401a841f","type":"api-current-state","z":"f602e6ba.609d28","name":"Wind <= 10 MPH","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"10","halt_if_type":"num","halt_if_compare":"lte","entity_id":"sensor.nws_wind_speed","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":250,"y":1320,"wires":[["d67106b42368e630"],["499b8bfb.3152a4"]]},{"id":"a3d75225807b70eb","type":"delay","z":"f602e6ba.609d28","name":"1 Hour Delay","pauseType":"delay","timeout":"1","timeoutUnits":"hours","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":250,"y":1260,"wires":[["8f026440401a841f"]]},{"id":"d67106b42368e630","type":"link out","z":"f602e6ba.609d28","name":"","links":["722d03d6.2ff77c"],"x":575,"y":1260,"wires":[]},{"id":"e2c37b65c5582c2b","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn Off Start/Stop tracking","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["automation.store_sprinkler_start_stop_times"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1040,"y":280,"wires":[[]]},{"id":"860a4c61d7557dc9","type":"api-call-service","z":"f602e6ba.609d28","name":"Turn On Start/Stop tracking","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["automation.store_sprinkler_start_stop_times"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1340,"y":440,"wires":[[]]},{"id":"061b74f643477dd9","type":"switch","z":"f602e6ba.609d28","name":"More Than 0 Entities?","property":"payload","propertyType":"msg","rules":[{"t":"nempty"},{"t":"empty"}],"checkall":"true","repair":false,"outputs":2,"x":1360,"y":120,"wires":[["43dedcca.ac7734"],[]]},{"id":"749afd72791a5127","type":"trigger","z":"f602e6ba.609d28","name":"Wait 1m","op1":"","op2":"0","op1type":"nul","op2type":"str","duration":"5","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":1240,"y":60,"wires":[["061b74f643477dd9"]]},{"id":"62b5545bc6d6e627","type":"template","z":"f602e6ba.609d28","name":"Template: Zone Last Ran >= 23 hours","field":"template","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{%- set entity_name = \"input_datetime{{ zones.zone }}\" | regex_replace(find='switch', replace='', ignorecase=False) -%}\n{%- set time = (as_timestamp(now()) - as_timestamp(states(entity_name+\"_last_start\"))) | int -%}\n{% if time >= 23*3600 %}1{% else %}0{% endif %}","output":"str","x":290,"y":1940,"wires":[["aa53225140781dd7"]]},{"id":"aa53225140781dd7","type":"api-render-template","z":"f602e6ba.609d28","name":"Evaluate Template","server":"e1dc0b88.463bb8","version":0,"template":"","resultsLocation":"data.continue","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":230,"y":2000,"wires":[["8113d83074ff7701"]]},{"id":"8113d83074ff7701","type":"switch","z":"f602e6ba.609d28","name":"Last Ran >= Template Hrs Ago","property":"data.continue","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":510,"y":2000,"wires":[["a31e3daf.17207"],[]]},{"id":"d83b5ff7a2212931","type":"api-call-service","z":"f602e6ba.609d28","name":"Notify via Wrapper","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": alert \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1250,"y":1940,"wires":[[]]},{"id":"a6c1fb68b48f2119","type":"inject","z":"f602e6ba.609d28","name":"09:05","props":[{"p":"payload"}],"repeat":"","crontab":"05 09 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"zone\":\"switch.irrigation_front_beds\",\"time\":10,\"name\":\"Front beds\"},{\"zone\":\"switch.irrigation_front_lawn\",\"time\":20,\"name\":\"Front lawn\"},{\"zone\":\"switch.irrigation_left_and_main_rear_lawn\",\"time\":20,\"name\":\"Left and main rear lawn\"},{\"zone\":\"switch.irrigation_front_and_right_rear_lawn\",\"time\":20,\"name\":\"Front and right rear lawn\"},{\"zone\":\"switch.irrigation_side_lawn\",\"time\":20,\"name\":\"Side lawn\"}]","payloadType":"json","x":150,"y":620,"wires":[["c05e6454.2f85b8"]]}] \ No newline at end of file diff --git a/extras/docker-compose/other/docker-compose.yml b/extras/docker-compose/other/docker-compose.yml index 30c3f082..114eca72 100644 --- a/extras/docker-compose/other/docker-compose.yml +++ b/extras/docker-compose/other/docker-compose.yml @@ -259,8 +259,8 @@ services: volumes: - /opt/cloudflared/:/home/nonroot/.cloudflared/ command: tunnel run nuc - github-runner: - container_name: github-runner + github-runner-1: + container_name: github-runner-1 image: myoung34/github-runner:latest restart: 'always' environment: @@ -274,6 +274,21 @@ services: volumes: - '/var/run/docker.sock:/var/run/docker.sock' - '/tmp/runner:/tmp/runner' + github-runner-2: + container_name: github-runner-2 + image: myoung34/github-runner:latest + restart: 'always' + environment: + RUNNER_NAME: nuc-runner-2 + ACCESS_TOKEN: XXXX + REPO_URL: https://github.com/aneisch/home-assistant-config + RUNNER_WORKDIR: /tmp/runner/work + LABELS: linux,x64,self-hosted + security_opt: + - label:disable + volumes: + - '/var/run/docker.sock:/var/run/docker.sock' + - '/tmp/runner:/tmp/runner' signal-rest-api: container_name: signal-rest-api image: bbernhard/signal-cli-rest-api:latest diff --git a/extras/docker-compose/unified/docker-compose.yml b/extras/docker-compose/unified/docker-compose.yml index c20f9de5..cfed40a3 100644 --- a/extras/docker-compose/unified/docker-compose.yml +++ b/extras/docker-compose/unified/docker-compose.yml @@ -421,8 +421,8 @@ services: volumes: - /opt/cloudflared/:/home/nonroot/.cloudflared/ command: tunnel run nuc - github-runner: - container_name: github-runner + github-runner-1: + container_name: github-runner-1 image: myoung34/github-runner:latest restart: 'always' environment: @@ -436,6 +436,21 @@ services: volumes: - '/var/run/docker.sock:/var/run/docker.sock' - '/tmp/runner:/tmp/runner' + github-runner-2: + container_name: github-runner-2 + image: myoung34/github-runner:latest + restart: 'always' + environment: + RUNNER_NAME: nuc-runner-2 + ACCESS_TOKEN: XXXX + REPO_URL: https://github.com/aneisch/home-assistant-config + RUNNER_WORKDIR: /tmp/runner/work + LABELS: linux,x64,self-hosted + security_opt: + - label:disable + volumes: + - '/var/run/docker.sock:/var/run/docker.sock' + - '/tmp/runner:/tmp/runner' signal-rest-api: container_name: signal-rest-api image: bbernhard/signal-cli-rest-api:latest diff --git a/images/nodered_1.png b/images/nodered_1.png index 9e68f0c87d380fcd6af32b689f07274202f97698..2ab5c8a5ef0475bc341b5fb9fb785d2a1ff05577 100644 GIT binary patch delta 101 zcmZ3_y`FnQ8HcnOFY9xq@RW^p4_E@tLyU~942`V}OtlRRtPBh$s?9HEU|>)!ag8WR tNi0dV%FR#7OsixtGB7gMH89dOf@?5=XmI1vsRn9b@O1TaS?83{1OT?X8v+0T delta 101 zcmZ3_y`FnQ8Ha?ZoW;2??|_YU4_E?CLW~Tpj18sekrd2W+85kMs8W`ys!8MpdH1r?(917IH;OXk;vd$@?2>|sx9U%Y! diff --git a/images/nodered_2.png b/images/nodered_2.png index 14d54e71f9d90ae993bba39674a899d2a5baab34..523b2ae211754586bf4fcd0e5abe30705d353bea 100644 GIT binary patch delta 101 zcmaFQ^`2`&8HcnOFF*VDeN`Ll7O(`GhZq@I85&y|nrIssSQ!}n{yim0*T6{E2wg+hGM%SD4Gf;HelF{r5}E*3s~#T! delta 101 zcmaFQ^`2`&8Ha?ZJe!zK`mT+23s?e8LW~Tpj18>}%(M**tPBh?LQV7-7#LJbTq8)!ag8WR qNi0dV%FR#7OsixtGB7gMH89dOLf62esm%t|z~JfX=d#Wzp$P!e0~+A~ delta 101 zcmaFB_keFg8Ha?ZyuhO$mtJqIo5&Vu5@KX%Wo&3=Xr^soU}a#i~RsBXkW{7xnM}H86O(`njxgN@xNAugxCX diff --git a/packages/irrigation.yaml b/packages/irrigation.yaml index 8d7c6af7..9bfec6ea 100644 --- a/packages/irrigation.yaml +++ b/packages/irrigation.yaml @@ -173,7 +173,7 @@ automation: date: "{{ (as_timestamp(now()) | timestamp_custom('%Y-%m-%d', true)) }}" - wait_template: "{{ is_state(trigger.entity_id, 'off') }}" timeout: - minutes: 25 + minutes: 60 continue_on_timeout: false - service: input_datetime.set_datetime data: diff --git a/www/community/lovelace-wallpanel/wallpanel.js b/www/community/lovelace-wallpanel/wallpanel.js index f3f3bec1..745e5c91 100644 --- a/www/community/lovelace-wallpanel/wallpanel.js +++ b/www/community/lovelace-wallpanel/wallpanel.js @@ -1284,7 +1284,7 @@ class WallpanelView extends HuiView { if (!options) { options = {year: "numeric", month: "2-digit", day: "2-digit"}; } - val = date.toLocaleDateString(undefined, options); + val = date.toLocaleDateString(elHass.__hass.locale.language, options); } return prefix + val + suffix; }); diff --git a/www/community/lovelace-wallpanel/wallpanel.js.gz b/www/community/lovelace-wallpanel/wallpanel.js.gz index 7fd7e50a7594f07f0325a607b76bf8b859d7f29b..cede9d2f0590a430b5e6a99aa062537a8f5723ec 100644 GIT binary patch delta 10418 zcmV;jC{5Rny#bTG0S6z82nY)5`>_XwE`Q92>OIP?c(&gi!YD2Z*``TG@!TvE5evkp z3tTQL6LQ{igA0Xp9M#^UR(_F5Yrl4yH0#lY;jECn&|?G!Qq{D$i)PwoRXrsycAcq* zZ;asiGd>}o4iGNU?T0~MycWN8airRo(nYfCF`jFlQqL*EG7PDDGU$|BBr$-AXMcg% zgVp(O3Zn<>Z&GmT;1B^%ZDvB z7q*|o&HMzL7-lP53ruKS&T+F|U~$8M&xU@yVO{qe&^7x_C&VWk2fZK;A{-$mg(_Bw z%Skl&;nnU9Ynez#_zmkq#^C*fD*3Qn`(x3P{_m`0%2=nFu?Zq&r884CD}UY8bDVt%)+aGE| zNSjtd7LgnZJ=|R`TGBa!qz1q6mhaut@?2mJBlv_2ia4#586H9o-hVf``<)hH62OcN zVU(-NH`(Ucynw%roj&6n+!C-`d-;%@wGfnjPJq?hKqd5qS<0D(%CoTmUmN%mSL6rA z?Uy2BN=QHkC^8OkH8I|6OuXR8 z7t$U+pi|NTQ;_PIMSn*(AxubS+l(Xd^lOrdhP~uO&XZ6J3#kWoGt6K zGcsQDzBfzI-275cqw|;1VPWi5VIlFqp(&a@hmK#G&7P^J&wm3q#3$v~YSW(nl5-9; z7kSW+yH>g$7=*C>^|(avTBE3_H>PNGh61)|HQx{8Laoz^*}@9OpypUWIi*j>pFr~Nh}|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_)LR2MPaNQieSaG zXfw)CD$12KuZyy6H+oHBZpIa*LH*+94_P!FBaAkeEV>VKf5ZI8KQd$YP$ufaxYeYT z!|T%%O68Bn=ao#tl@SZTzQJHc7irB5ejkMkuh4#qG* zW!H4a%%r0*@8q>pnhH2lJ%Spysc1EzHuiVbBBH9LYuWNV?&GG{GD8LGiZGpHiSTV& zmy8>K!k@uLf6?2PrZEwYCwU3f7MDNCiewA%2Vd!-5yl{`OPqFpYqtaq|I^*7R)6{X z{-CeKje0{FgVH_*)~SmTK%X%4V%YTDsE7Ut%Qfp5B7BF<0Bm^;sF(daN{7 zm(a8a3jGp2kd9V>CG6P}n#-5aHnc<}UqTB|RO!Wie-H6>2a)meE0B`yF0H;jK<7g? zs5{L4V)yjwI@sOS1{JMW`1%}d_4}@mYqfCBj~3NilqytCo32Vw32Q+Vsjk)F2QOAF zt<`>6s|hokde0J9u&V+Z*37gUzM3)IZR;0nsZJ6H9TEe-7{d+-EgCFn6ZY^7PdfLM zD|8!&fBA16Wg2NlI&`**$3HO-lz-BM=^e%4g{XiE{M2O7lm|W=h_Wm=U_lSSC$hCA zh25-?I+JSA0;q5pg3D6Dx3DOte9;oL%Qlcz)pPVKHjwxAU*W&}LRQee%u0<)xFU=> z>`It{ETvA((hG&)B`G^(aU~aVdg2aT1+vq56+#A-lGjwyap@4({|9j!hEQc-0RT&} B?WO<# diff --git a/www/community/numberbox-card/numberbox-card.js b/www/community/numberbox-card/numberbox-card.js index 9e826e55..359fac6a 100644 --- a/www/community/numberbox-card/numberbox-card.js +++ b/www/community/numberbox-card/numberbox-card.js @@ -1,6 +1,6 @@ ((LitElement) => { -console.info('NUMBERBOX_CARD 4.3'); +console.info('NUMBERBOX_CARD 4.7'); const html = LitElement.prototype.html; const css = LitElement.prototype.css; class NumberBox extends LitElement { @@ -16,28 +16,31 @@ constructor() { render() { if(!this.stateObj){return html`Missing:'${this.config.entity}'`;} - if( this.config.name === undefined && this.stateObj.attributes.friendly_name ){ - this.config.name=this.stateObj.attributes.friendly_name; - } - if( this.config.icon === undefined && this.stateObj.attributes.icon ){ - this.config.icon=this.stateObj.attributes.icon; - } - if( this.config.picture === undefined && this.stateObj.attributes.entity_picture ){ - this.config.picture=this.stateObj.attributes.entity_picture; + + const k={name:'friendly_name',icon:'icon',picture:'entity_picture',unit:'unit_of_measurement'}; + for(const n of Object.keys(k)) { + if( this.config[n] === undefined && this.stateObj.attributes[k[n]] ){ + this.config[n]=this.stateObj.attributes[k[n]]; + } } - if( this.config.unit === undefined && this.stateObj.attributes.unit_of_measurement ){ - this.config.unit=this.stateObj.attributes.unit_of_measurement; + + const d={min:0,max:9e9,step:1,toggle:null}; + for(const j of Object.keys(d)) { + const b=j+'_entity'; + if(b in this.config && this.config[b] in this._hass.states ) { + const c=this._hass.states[this.config[b]]; this.old.t[this.config[b]]=c.last_updated + if( d[j]!==null && !isNaN(parseFloat(c.state)) ){this.config[j]=c.state;} + if(j=='toggle'){this.config[j]=c;} + } + if(d[j]!==null){ + if(this.config[j] === undefined){ this.config[j]=this.stateObj.attributes[j];} + if(isNaN(parseFloat(this.config[j]))){this.config[j]=d[j];} + } } - if(this.config.min === undefined){ this.config.min=this.stateObj.attributes.min;} - if(isNaN(parseFloat(this.config.min))){this.config.min=0;} - if(this.config.max === undefined){ this.config.max=this.stateObj.attributes.max;} - if(isNaN(parseFloat(this.config.max))){this.config.max=9e9;} - if('step_entity' in this.config && this.config.step_entity in this._hass.states && !isNaN(parseFloat(this._hass.states[this.config.step_entity].state))) {this.config.step=this._hass.states[this.config.step_entity].state;} - if(this.config.step === undefined){ this.config.step=this.stateObj.attributes.step;} return html` - ${(this.config.icon || this.config.picture || this.config.name) ? html`
+ ${(this.config.icon || this.config.picture || this.config.name) ? html`
${this.config.picture ? html` -
${this.renderNum()}
` : this.renderNum() } +
${this.renderNum()}
+ ${this.config.toggle ? html`
` : null } + ` : this.renderNum() }
`; } @@ -168,24 +174,28 @@ setNumb(c){ if( v===false ){ v=this.timeNum(this.state); v=isNaN(v)?this.config.min:v;} let adval=c?(v + Number(this.config.step)):(v - Number(this.config.step)); adval=Math.round(adval*1e9)/1e9; - if( adval <= Number(this.config.max) && adval >= Number(this.config.min)){ - this.pending=(adval); - if(this.config.delay){ - clearTimeout(this.bounce); - this.bounce = setTimeout(this.publishNum, this.config.delay, this); - }else{ - this.publishNum(this); + if(adval==this.state){ + clearTimeout(this.bounce);this.pending=false; + }else{ + if(adval <= Number(this.config.max) && adval >= Number(this.config.min)){ + this.pending = adval; + if(this.config.delay){ + clearTimeout(this.bounce); + this.bounce = setTimeout(this.publishNum, this.config.delay, this); + }else{ + this.publishNum(this); + } } } } publishNum(dhis){ + if(dhis.pending===false){return;} const s=dhis.config.service.split('.'); if(s[0]=='input_datetime'){dhis.pending=dhis.numTime(dhis.pending,1);} const v={entity_id: dhis.config.entity, [dhis.config.param]: dhis.pending}; dhis.pending=false; dhis.old.state=dhis.state; - dhis._hass.callService(s[0], s[1], v); } @@ -271,6 +281,10 @@ static get styles() { display: grid; grid-template-columns: repeat(2, auto); } + .gridt { + display: grid; + grid-template-columns: repeat(3, auto); + } .grid-content { display: grid; align-items: center; } @@ -537,6 +551,24 @@ render() { step="any" > +
+ + +
+ +
+
ic5?|88|{Vr6n-Z+I{3y@n>Z-IlnIa*HV~XVRq0yXH|NXif00~N@#-4NKwkom&G#cHF zM!(Rrrulo2zY6(=N4dqE3EOwOUL0j{$cI6+j7{V1A8&qn_2HLy|26;hZy#Q=ABO*K zSYv|8**f2Z%wZLZVUosqoIfOdh;s_g%d$2wm;$KK1&FuBX2H{6;vM6=oJW49tx$C3 zY2oE@YFaSR$%=%-*KxO#uY+v3h>OVMu+h>DGpJn_gQZ54}G?_4dXEG9=hEW_TiGSU};`d=-w^vtbNM!B8^C5AFtQ$ zz;jc7@+QbKAi_4j*%LT$xC~Z9;5W!04#xGR0{l2WbUWRSkme_6AGsTD8_P6+O~Z#d z{xtdlOxp&28vP{jU_XEnxaRV=(J!JPw+;N9$IJPKyBQ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