tr1plus / ha-aftership

Aftership state card for use in HomeAssistant
MIT License
16 stars 1 forks source link

Try to add the "message" field from the XML in the state-card-aftership.html #4

Open yalmog99 opened 5 years ago

yalmog99 commented 5 years ago

Hi, Great card ! I tried to add also the "message" field from the XML in the state-card-aftership.html file and it does not work. I have added 2 lines (marked as bold below ) but the custom card is not updated with the new column. What am I doing wrong ?

<div class="card">
    <small><a href="https://secure.aftership.com/#/dashboard" target="_blank">Aftership Dashboard</a></small><br>
    <b>Tracking: </b> {{stateObj.state}} items
    <table style="width:100%">
     <thead>
      <tr>
        <th>Item</th>
        <th>Status</th> 
        <th>Tracking Number</th>
        **<th>Status</th>**
      </tr>
     </thead>
     <tbody>
      <template is="dom-repeat" items="{{stateObj.attributes.data.trackings}}">
       <tr>
         <td>{{item.title}}</td>
         <td>{{item.tag}}</td>
         <td>{{item.tracking_number}} <small>({{item.slug}})</small></td>
         **<td>{{item.message}}</td>**
       </tr>
      </template>
     </tbody>
    </table>
</div>