• 1 Post
  • 19 Comments
Joined 1 year ago
cake
Cake day: July 2nd, 2023

help-circle









  • Otkaz@lemmy.worldtoFuck Cars@lemmy.worldThe dream 🚲
    link
    fedilink
    English
    arrow-up
    2
    ·
    11 months ago

    Definitely not my baby. Just a cheap reliable source or transportation in a city that you have to own a car to get anywhere. Paints chipping off and it has rust but still gets me to work everyday so I don’t care. I’m a tightwad so spending like this will never make any since to me. I’m just not a person that wants many material things.


  • Otkaz@lemmy.worldtoFuck Cars@lemmy.worldThe dream 🚲
    link
    fedilink
    English
    arrow-up
    25
    arrow-down
    4
    ·
    edit-2
    11 months ago

    I’m more wondering why someone would spend that much on a damn bike. I bought my car for 15k of course that was in 2010 but I’m still driving it to this day. Toyota Corolla before anyone asks.

    Edit: I just realized this was posted under fuck cars and now I feel like a dick comparing it to the price of my car. It wasn’t intentional but still holy shit that’s still a stupid amount of money to spend on a bike. Like how can you even justify that price? It has to be a completely insane amount of markup.


  • After a water heater leak I just made my own. I run my HA on a Raspberry Pi, so I connected the GPIO pins to a current-limiting resistor and some wires that I put in the drip pan of my water heater. I made the two contacts using a screw connector, and hot glued it in the pan. You can also do this with an ESP chip. Additionally, I integrated my smoke detectors through an optoisolator and connected all my hard-wired door and window sensors to the GPIO. It’s been working great this way for me.





  • To give more context I’m working on a media control dashboard. The script or rather scripts I have to send commands to kodi is as follows

    kodi_control:
      sequence:
      - service: kodi.call_method
        target:
          entity_id: '{{ kodi_entity }}'
        data:
          method: '{{ kodi_method }}'
    
    kodi_control_playback:
      sequence:
      - service: kodi.call_method
        target:
          entity_id: '{{ kodi_entity }}'
        data:
          method: '{{ kodi_method }}'
          playerid: '{{ kodi_playerid }}'
    
    kodi_control_subtitles:
      sequence:
      - service: kodi.call_method
        target:
          entity_id: '{{ kodi_entity }}'
        data:
          method: '{{ kodi_method }}'
          action: '{{ kodi_action }}'
    
    kodi_control_seek:
      sequence:
      - service: kodi.call_method
        target:
          entity_id: '{{ kodi_entity }}'
        data:
          method: '{{ kodi_method }}'
          playerid: '{{ kodi_playerid }}'
          value: '{{ kodi_value }}'
    
    kodi_control_playlist:
      sequence:
      - service: kodi.call_method
        target:
          entity_id: '{{ kodi_entity }}'
        data:
          method: '{{ kodi_method }}'
          window: '{{ kodi_window }}'
          parameters: '{{ [ kodi_parameters ] }}'
    

    I would like to condense all of this down to a single script using “is defined” to omit the parts not needed for certain commands so something like

    kodi_control:
      sequence:
      - service: kodi.call_method
        target:
          entity_id: '{{ kodi_entity }}'
        data: >-
          method: '{{ kodi_method }}'
          {% if kodi_playerid is defined %}
            playerid: '{{ kodi_playerid }}'
          {% endif %}
          {% if kodi_action is defined %}
            action: '{{ kodi_action }}'
          {% endif %}
          {% if kodi_value is defined %}
            value: '{{ kodi_value }}'
          {% endif %}
          {% if kodi_window is defined %}
            window: '{{ kodi_window }}'
          {% endif %}
          {% if kodi_parameters is defined %}
            parameters: '{{ [ kodi_parameters ] }}'
          {% endif %}
    

    Problem with the above is I get “result is not a dictionary”