This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Start-DNSClientLog { | |
$DnsOpLog = Get-WinEvent -ListLog Microsoft-Windows-DNS-Client/Operational | |
$DnsOpLog.IsEnabled = $true | |
$DnsOpLog.SaveChanges() | |
} | |
function Get-DNSClientQueries { | |
foreach($event in (get-winevent Microsoft-Windows-DNS-Client/Operational | % { [xml]$_.ToXml() })) { | |
$Query = ($event.Event.EventData.Data | Where-Object { $_.Name -eq "QueryName" }).'#text' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Showing the state of a temperature in a template card: | |
{{ states('sensor.your_temperature_sensor') }} | |
#Change the colour of the light depending on status: | |
{% if is_state('light.your_light', 'on') %} | |
orange | |
{% endif %} | |
#Welcome template: | |
#Updated to greet the user by first name only |