![]() The 5 best ultrawide monitors for gaming and work in 2024 Download Mobile Legends Bang Bang for Android.Download Adobe Flash Player for Windows.If the config passes validation, restart HA. $headersRaw = Get-Content $logFile | Select-Object -First 1 Clean unfriendly characters and whitespace. ![]() $values = value headers here as they appear in the CSV ![]() #Set trap to unmount PSDrive if breaking error is encountered $outFile = "HALogging:\config\filesensors\deathknell.txt" $logFile = "$env:ProgramData\Logs\HWInfo\sensors.CSV" New-PSDrive -Name HALogging -PSProvider FileSystem -Credential $credential -Root $sharePath -ErrorAction Stop $credential = Import-Clixml -Path "$PSScriptRoot\Cred_HALogging.xml" Use the names that appear in the CSV.Ĭreate a schedule task to run Powershell on startup with -WindowStyle Hidden -File C:\Scripts\LogTemps.ps1. Plug your values into $sharePath ( '\\\'), $logFile (the log coming from HWInfo) and $outFile (the file to be read by homeassistant).Īdd the attributes you want to extract to $values. If not, you’ll want to remove -Credential $credential. If your share is secured, you’ll want to create your own $credential object to import. If you’re getting value_json.whatever is not defined in your HA log, you probably have some junk data on your final line. A file sensor only reads the last line of a file, so all our values need to be there.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |