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

I’ve been tossing around the idea of revamping CoffeeBear.net’s theme for ages now. Many months ago, I started building a new theme entirely from scratch but I ran into some difficulties with it and ran out of time motivation for doing that. Then a while ago, I saw the Romangie theme get posted to the WordPress Themes directory. I liked most everything about the theme, so I decided to dump the what I’d started working on and build a child theme instead.

And that brings us to today when I decided to go ahead and pull the trigger activating the new look. Most of changes are centered around two areas: support for the Now-Reading Reloaded plugin[ref]Though I see after activating the new theme that I forgot to customize Now-Reading’s Tag page. Whoops, I’ll have to get that fixed ASAP![/ref] and switching up the colors. My colors all come from this photo being run through the Colorpeek service to get this palette.

Hopefully this fresh look works well for all my faithful visitor(s); but if you do find a problem please let me know.

Week 05: Cage Without a Key

That’s the thing about depression: A human being can survive almost anything, as long as she sees the end in sight. But depression is so insidious, and it compounds daily, that it’s impossible to ever see the end. The fog is like a cage without a key.

— Elizabeth Wurtzel

Wait, Week 05? What ever happened to Week 04? Well, my proper camera met with a bit of an accident back on Christmas day and it’s been finally sent in for repairs. It took me a bit to locate my old P&S[ref]This is my old Canon PowerShot S500 Digital Elph. It’s a decent camera, though its autofocus is annoyingly slow.[/ref]. Plus, I’ve just been feeling a bit down of late. When I first realized I’d missed week 04, I planned on posting 2 photos for week 05 to make up for it. Unfortunately, I’ve not been shooting as many images and this was the only halfway decent one of the few I did have. Maybe I’ll post an extra image later in the year to make up to week 04; we’ll just have to wait and see.

Side note: I’ve been working on a new theme for this site and unlike most themes I’ve done this time I plan to do it all from scratch (sort of). I’m using a combination of HTML5 Boilerplate an 960 Grid System to build it, rather than working with an existing WordPress theme. Why? In part because I’ve not worked with HTML5/CSS3 yet and want to and in part because I feel Ian Stewart’s right when he says You should be building your own WordPress Theme Framework. …. Make it your own. When you’re done you’ll have the best WordPress Theme — for you.

One of my goals for this year[ref]I don’t really do new year resolutions, but I do occasionally set personal goals for the new year around January 1st.[/ref] is to write more here; so while I don’t have a single idea that feels worthy of a full post, here’s a dump of various things floating around/through my skull today.

  • Is today stupid driving day or something? I’ll grant I left for work a few minutes later than usual, but it seems odd that so many people would continually be pulling out into moving traffic (from driveways and side streets) and then going so slowly[ref]Example in a 40mph zone, a car pulled out of a driveway less than half a block ahead of me, pulled across the lane I was driving in into the other lane and then just as I caught up to them they pulled right back in front of me.[/ref]. Fortunately the roads were relatively clean this morning, so I was able to stop before plowing into any of those idiots, but still….
  • Back in the day when Javascript was new to the web, many sites used it to frequently touch my browser in the bad way. So I quickly grew to hate it and pretty much ignored/disabled it for years. In more recent times, Javascript usage has grown up/cleaned up its act. To the point where I’m actually interested in learning to use it. So I’ve been searching around for some decent tutorials but haven’t had a lot of luck. Most tutorials either assume you already know quite a bit about Javascript or are so extremely dated that they’re useless. I did run across 2 sites with tutorials that don’t seem to be too awful: Codecademy[ref]Codecademy gives a decent general knowledge of Javascrip. Though the site is far from perfect, with bugs in the lessons that prevent you from completing them or with questions that unclear in what they are looking for and hints that can be utterly useless[/ref] and jQuery for Absolute Beginners[ref]While technically these tutorials cover jQuery (a Javascript library) rather than “pure” Javascript and while covering an older version of jQuery (1.2.6), it still has been very interesting to go over so far.[/ref]
  • I’ve been thinking about about redesigning this site, but I’m trouble deciding what to do. I’ve got some ideas floating around in my skull, but I might hold off until I can look into working up a logo.