Giter Club home page Giter Club logo

lovelace-vasttrafik-card's People

Contributors

frankysan avatar miicroo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

lixgbg frankysan

lovelace-vasttrafik-card's Issues

Better handling of empty sensor

I have a sensor for a bus that runs at certain time intervals, and only on weekdays. This means that the sensor is undefined for all other times. This results in a line that doesn't get rendered properly on the card.

This is my code for the card:

type: custom:vasttrafik-card
title: Bussavgångar
entities:
  - sensor.17_mot_stan
  - sensor.44_mot_stan
municipality: Göteborg
sort: true
showFrom: false
showTo: false
showDir: true

The code for sensors:

- platform: vasttrafik
  key: !secret vasttrafik_api_key
  secret: !secret vasttrafik_api_secret
  departures:
    - name: 17, Mot stan
      from: Norumsgärde
      heading: Tuve torg
      delay: 5
      lines:
        - 17
    - name: 44, Mot stan
      from: Norumsgärde
      heading: Tuve torg
      delay: 5
      lines:
        - 44

The resulting card:
vasttrafik

I'm not really a programmer, more of a hobby hacker, but I'll see what I can do myself on my branch.

Trouble getting the lovelace-card to work.

Dear Magnus,

I'm quite new to HA and adding cards manually.

What I've done so far:

  • Added vasttrafik-card.js, vasttrafik-card-editor.js, vasttrafik-card.css from the dist folder to:
    ../www/community/lovelace-vasttrafik-card

  • Added your version of vasttrafik sensor (ha-vasttrafik) to:
    ../custom_components/vasttrafik

  • I also added the url of the lovelace .js files via the GUI:
    https://my.home-assistant.io/redirect/lovelace_resources/

With these entries:

  • url: /local/community/lovelace-vasttrafik-card/vasttrafik-card.js
    type: module
  • url: /local/community/lovelace-vasttrafik-card/vasttrafik-card-editor.js
    type: module
  • Restarted HA and the browser but when I try to add the card with yaml in the editor of HA it gets this error:

image

Sincerely yours,
MonkeyFaceMoney

Update editor

The editor needs a refresh and to get up to the latest standards, at the moment it is broken.

Unreasonable departure times, "in 1000+ minutes"

Sometimes the card shows unreasonable values, like 1000+ minutes to the next departure. It seems to happen mostly on the HA app on android, but haven't found all edge cases yet. It can either be that the card itself is not updated, that the values are incorrect or a miscalculation.

Add option to have "To" in table instead of "From"

It would be good to have the table optionally show the "heading" (as specified in the configuration) in the table instead of the "from", since "from" does not specify the direction, one tram number can go two directions.

I normally use only one "from" station but multiple "headings", depending on where I am going.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.