I’ve been running Home Assistant in Docker on a Raspberry Pi for sometime now. The Raspberry Pi was initially setup for running Pi-Hole, and I didn’t want to wipe that out when I decided to start playing around with Home Assistant. This had the downside of making it more difficult to install add-ons to HA; so I had started planning out a change to my setup. Unfortunately, we had a recent storm that killed power to my house and after power was restored my Raspberry Pi failed to boot. I’ve not had any luck bringing it back online, though admittedly I have been spending more time figuring out alternate arrangements for running various services at home. I also decided that I should spend more time documenting the various configurations and tweaks I’m making to my setup. That way when I next have a problem knocking out my setup; I’ll lose less time restoring it.

Home Assistant Temperature Display
Home Assistant Temperature Display

Along with getting things set back up, I’m also working on improving how various information gets displayed. In the upstairs of our house, I have a sensor that reports the temperature to Home Assistant. That temperature data is nicely integrated as a sensor; so HA will track it over time. While playing around with various settings, I decided it would be cool if I could get that information for the downstairs of our house. Since our thermostat is downstairs, this seemed like it would be an easy win. It took more than just a little googling to work everything out; as our thermostat does not send over the temperature data in the same way. Instead, it sends the current temperature over as an attribute. Attributes aren’t tracked over time and are more difficult to work with. But with classic McKibben stubbornness, I kept at it and finally figured out a working solution.

    1. I went into Developer Tools > States.
    2. Searched for the entity created by the thermostat’s HA integration. In my case, this was called climate.thermostat.
    3. Looking over the attributes on climate.thermostat, I saw current_temperature attribute.
    4. A bunch of googling later, I found I could extract that attribute using this code: value_template: "{{ state_attr('climate.thermostat', 'current_temperature') }}". I was able to confirm that this worked in Developer Tools > Template, but at this point I hadn’t found any instructions on where to add this code in a non-testing fashion.
    5. A ridiculous amount of googling later, I found out the trick is to add a sensor1There can be only one! Which is to say HA only allows for one sensor section; if you have multiple sensors to add, then they all go under the same sensor section. The complete code I’m using to add this sensor to my HA setup is:
       # Temperature from Living Room Thermostat
       - platform: template
       friendly_name: "Living Room Temperature"
       unit_of_measurement: '°F'
       value_template: "{{ state_attr('climate.thermostat', 'current_temperature') }}"
    6. Once I had the temperature being properly captured from the thermostat; it was pretty simple to get the sort of display I wanted to see. I made use of the mini-graph-card available via HACS to make my Home Assistant Temperature Display card.
      type: horizontal-stack
        - type: custom:mini-graph-card
            - sensor.hue_motion_sensor_temperature
          name: Upstairs
          hours_to_show: 48
          points_per_hour: 0.25
            - value: 70
              color: '#3381FF'
            - value: 80
              color: '#ffb133'
            - value: 90
              color: '#FF4B33'
        - type: custom:mini-graph-card
            - sensor.living_room_temp
          name: Living Room
          hours_to_show: 48
          points_per_hour: 0.25
            - value: 70
              color: '#3381FF'
            - value: 80
              color: '#ffb133'
            - value: 90
              color: '#FF4B33'

Now with both the senor and the card added, I finally have my ideal display for the temperature on both floors of our house. The graph displays the last 48 hours with different temps displaying in different colors (cooler ones shifting towards blue, warmer ones shifting towards red).

For work, I’ve been making my way through Learn dbatools in a Month of Lunches. Down in Chapter 21, it talks about using Get-DbaRandomizedValue to generate random data and I was curious what that random data might look like. I tried following the documentation for running this command, but I was specifically trying to run the command to generate Lorem Ipsum data, like so: Get-DbaRandomizedValue -RandomizerType Lorem -RandomizerSubType ntext -max 75. But when I ran that command, I kept getting this warning/error: WARNING: [09:20:40][Get-DbaRandomizedValue] Invalid randomizer sub type. This was driving me a bit crazy, especially as the documentation doesn’t give any hints on what a valid randomizer sub type would be. Eventually by reading through the PowerShell code for Get-DbaRandomizedValue on GitHub; I noticed this module imports the list of randomizer types from a CSV file installed with the module. The current list of these types can be found on GitHub, but for the lazy (like me) here’s what that CSV file holds:

Type SubType
Address BuildingNumber
Address CardinalDirection
Address City
Address CityPrefix
Address CitySuffix
Address Country
Address CountryCode
Address County
Address Direction
Address FullAddress
Address Latitude
Address Longitude
Address OrdinalDirection
Address SecondaryAddress
Address State
Address StateAbbr
Address StreetAddress
Address StreetName
Address StreetSuffix
Address ZipCode
Commerce Categories
Commerce Color
Commerce Department
Commerce Price
Commerce Product
Commerce ProductAdjective
Commerce ProductMaterial
Commerce ProductName
Company Bs
Company CatchPhrase
Company CompanyName
Company CompanySuffix
Database Collation
Database Column
Database Engine
Database Type
Date Between
Date BetweenOffset
Date Future
Date FutureOffset
Date Month
Date Past
Date PastOffset
Date Recent
Date RecentOffset
Date Soon
Date SoonOffset
Date Timespan
Date Weekday
Date Random
Finance Account
Finance AccountName
Finance Amount
Finance Bic
Finance BitcoinAddress
Finance CreditCardCvv
Finance CreditCardNumber
Finance Currency
Finance EthereumAddress
Finance Iban
Finance RoutingNumber
Finance TransactionType
Hacker Abbreviation
Hacker Adjective
Hacker IngVerb
Hacker Noun
Hacker Phrase
Hacker Verb
Hashids Decode
Hashids DecodeHex
Hashids DecodeLong
Hashids Decrypt
Hashids DecryptHex
Hashids Encode
Hashids EncodeHex
Hashids EncodeLong
Hashids Encrypt
Hashids EncryptHex
Image Abstract
Image Animals
Image Business
Image Cats
Image City
Image DataUri
Image Fashion
Image Food
Image Image
Image Nature
Image Nightlife
Image People
Image Sports
Image Technics
Image Transport
Internet Avatar
Internet Color
Internet DomainName
Internet DomainSuffix
Internet DomainWord
Internet Email
Internet ExampleEmail
Internet Ip
Internet Ipv6
Internet Mac
Internet Password
Internet Protocol
Internet Url
Internet UrlWithPath
Internet UserAgent
Internet UserName
Lorem Letter
Lorem Lines
Lorem Paragraph
Lorem Paragraphs
Lorem Sentence
Lorem Sentences
Lorem Slug
Lorem Text
Lorem Word
Lorem Words
Name FindName
Name FirstName
Name FullName
Name JobArea
Name JobDescriptor
Name JobTitle
Name JobType
Name LastName
Name Prefix
Name Suffix
Name HasFirstNameList
Name SupportsGenderFirstNames
Name SupportsGenderLastNames
Name SupportsGenderPrefixes
Person Address
Person Avatar
Person Company
Person Context
Person DateOfBirth
Person Email
Person FirstName
Person FullName
Person Gender
Person LastName
Person Phone
Person UserName
Person Website
Phone PhoneNumber
Phone PhoneNumberFormat
Random AlphaNumeric
Random Bool
Random Byte
Random Bytes
Random Char
Random Chars
Random ClampString
Random CollectionItem
Random Decimal
Random Digits
Random Double
Random Enum
Random Even
Random Float
Random Guid
Random Hash
Random Hexadecimal
Random Int
Random ListItem
Random ListItems
Random Long
Random Number
Random Odd
Random RandomLocale
Random Replace
Random ReplaceNumbers
Random ReplaceSymbols
Random SByte
Random Short
Random Shuffle
Random String
Random String2
Random UInt
Random ULong
Random UShort
Random Uuid
Random WeightedRandom
Random Word
Random Words
Random WordsArray
Rant Review
Rant Reviews
System AndroidId
System ApplePushToken
System BlackBerryPin
System CommonFileExt
System CommonFileName
System CommonFileType
System DirectoryPath
System Exception
System FileExt
System FileName
System FilePath
System FileType
System MimeType
System Semver
System Version
Static None