Save the below file inside ".homeassistant/custom_components/shelly" as switch.py (create the folders if not present), create an empty init.py file in that folder too, and restart HASS.
usage example:
switch:
- platform: shelly
switches:
#!/bin/bash | |
old_ip="111.111.111.111" | |
new_ip="222.222.222.222" | |
email="[email protected]" | |
api_token="0123456789abcdefghijklmnopqrstuvwxyz1234" | |
zone_id_list=( $(curl -s -X GET "https://api.cloudflare.com/client/v4/zones/?per_page=500" -H "X-Auth-Email: $email " -H "Authorization:Bearer $api_token " -H "Content-Type: application/json"| jq -r '.result[].id') ) | |
for zone_id in "${zone_id_list[@]}" |
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: light-gray; icon-glyph: car; | |
// version 2021-02-10 | |
// add your my-renault account data: | |
let myRenaultUser = "user" // email | |
let myRenaultPass = "pass" // password | |
// set your ZOE Model (Phase 1 or 2) // bitte eingeben! |
#!/bin/sh | |
# | |
# check the bare domain IP against the current CDN hostnames | |
# | |
# edit me! | |
DOMAINS=array( 'hiscoxbroker.co.uk' 'hiscox.de' 'hiscox.ie' ) | |
for DOMAIN in "${DOMAINS[@]};" do | |
echo "checking $DOMAIN" |
#!/bin/sh | |
# | |
# check the bare domain IP against the current CDN hostnames | |
# | |
# edit me! | |
DOMAIN=hiscoxbroker.co.uk | |
# gather details | |
BAREIP=`dig a $DOMAIN +short` | |
CDN=`dig $DOMAIN.cdn.cloudflare.net +short` |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
#set -o verbose | |
#set -x | |
#set -v | |
#sed -e :a -e '$!N;s/ \n/,/;ta' | |
#start the file over and erase contents | |
echo '' > details.csv | |
#write the column headings |
<?php | |
/** | |
* Add content type to the class of the row. | |
*/ | |
function MODULE_preprocess_semanticviews_view_unformatted(&$vars, $hook) { | |
if ($hook == 'semanticviews_view_unformatted__package__node_content_1') { | |
// The index in the field array is the simple field name and is consistent | |
// across joins. e.g. when the field is 'type', the field alias could be | |
// 'node_node_data_field_package_content_type' if it's at the end of a |